use of zemberek.morphology.generator.WordGenerator.Result in project zemberek-nlp by ahmetaa.
the class WordGeneratorTest method testGeneration5.
@Test
public void testGeneration5() {
TurkishMorphotactics mo = getMorphotactics("yapmak");
WordGenerator wordGenerator = new WordGenerator(mo);
List<String> morphemes = Lists.newArrayList("Verb", "Opt", "A1pl");
DictionaryItem item = mo.getRootLexicon().getItemById("yapmak_Verb");
List<Result> results = wordGenerator.generate(item, TurkishMorphotactics.getMorphemes(morphemes));
Assert.assertTrue(results.size() > 0);
Assert.assertEquals("yapalım", results.get(0).surface);
}
Aggregations