Search in sources :

Example 1 with StemNodeGenerator

use of zemberek.morphology.lexicon.tr.StemNodeGenerator in project zemberek-nlp by ahmetaa.

the class StemNodeGeneratorTest method empty.

@Test
public void empty() {
    StemNodeGenerator generator = new StemNodeGenerator(suffixes);
    DictionaryItem kitap = getDictionaryItem("kitap");
    StemNode[] nodes = generator.generate(kitap);
    Assert.assertEquals(2, nodes.length);
    DictionaryItem odun = getDictionaryItem("odun");
    StemNode[] odunNodes = generator.generate(odun);
    Assert.assertEquals(1, odunNodes.length);
}
Also used : DictionaryItem(zemberek.morphology.lexicon.DictionaryItem) StemNodeGenerator(zemberek.morphology.lexicon.tr.StemNodeGenerator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DictionaryItem (zemberek.morphology.lexicon.DictionaryItem)1 StemNodeGenerator (zemberek.morphology.lexicon.tr.StemNodeGenerator)1