예제 #1
0
def test_simple_analyzer():
    analyzer = annif.analyzer.get_analyzer("simple")
    assert analyzer.normalize_word("Big") == "big"
예제 #2
0
def test_snowball_finnish_analyzer_normalize_word():
    analyzer = annif.analyzer.get_analyzer("snowball(finnish)")
    assert analyzer.normalize_word("vanhat") == "vanh"
    assert analyzer.normalize_word("koirien") == "koir"
예제 #3
0
def test_english_analyzer_normalize_word():
    analyzer = annif.analyzer.get_analyzer("snowball(english)")
    assert analyzer.normalize_word("running") == "run"
    assert analyzer.normalize_word("words") == "word"
예제 #4
0
def test_swedish_analyzer_normalize_word():
    analyzer = annif.analyzer.get_analyzer("snowball(swedish)")
    assert analyzer.normalize_word("gamla") == "gaml"
    assert analyzer.normalize_word("hundar") == "hund"
예제 #5
0
def test_voikko_finnish_analyzer_normalize_word():
    analyzer = annif.analyzer.get_analyzer("voikko(fi)")
    assert analyzer.normalize_word("xyzzy") == "xyzzy"
    assert analyzer.normalize_word("vanhat") == "vanha"
    assert analyzer.normalize_word("koirien") == "koira"