use of zemberek.morphology.lexicon.graph.DynamicLexiconGraph in project zemberek-nlp by ahmetaa.
the class WordAnalyzerTest method testVoicing.
@Test
public void testVoicing() {
DynamicLexiconGraph graph = getLexiconGraph("armut");
assertHasParses(graph, "armut", "armuda", "armutlar", "armutlara");
assertUnParseable(graph, "armud", "armuta", "armudlar");
}
use of zemberek.morphology.lexicon.graph.DynamicLexiconGraph in project zemberek-nlp by ahmetaa.
the class WordAnalyzerTest method testVowelDrop.
@Test
public void testVowelDrop() {
DynamicLexiconGraph graph = getLexiconGraph("ağız [A: LastVowelDrop]", "nakit [A:LastVowelDrop]", "vakit [A:LastVowelDrop, NoVoicing]");
assertHasParses(graph, "vakitlere", "ağza", "ağız", "ağızlar", "nakit", "nakitlere", "nakde", "vakit", "vakte");
assertUnParseable(graph, "ağz", "ağıza", "ağzlar", "nakd", "nakt", "nakite", "nakda", "vakide", "vakda", "vakite", "vakt");
}
use of zemberek.morphology.lexicon.graph.DynamicLexiconGraph in project zemberek-nlp by ahmetaa.
the class WordAnalyzerTest method testSuffixNonDeterminism.
@Test
public void testSuffixNonDeterminism() {
DynamicLexiconGraph graph = getLexiconGraph("elma");
assertHasParses(graph, "elmacığa", "elmacık");
assertUnParseable(graph, "elmacığ", "elmacıka", "elmamcık", "elmayacık", "elmalarcık");
}
use of zemberek.morphology.lexicon.graph.DynamicLexiconGraph in project zemberek-nlp by ahmetaa.
the class WordAnalyzerTest method testCompoundsVoicing.
@Test
public void testCompoundsVoicing() {
DynamicLexiconGraph graph = getLexiconGraph("at [A:NoVoicing]", "kuyruk", "atkuyruğu [A:CompoundP3sg; Roots:at-kuyruk]");
assertHasParses(graph, "atkuyruğu", "atkuyruklarım", "atkuyrukçuk");
assertUnParseable(graph, "atkuyruğlarım", "atkuyruk");
}
use of zemberek.morphology.lexicon.graph.DynamicLexiconGraph in project zemberek-nlp by ahmetaa.
the class SimpleGeneratorTest method getLexicon.
private DynamicLexiconGraph getLexicon() throws IOException {
RootLexicon items = new TurkishDictionaryLoader().load(new File(Resources.getResource("dev-lexicon.txt").getFile()));
DynamicLexiconGraph graph = new DynamicLexiconGraph(suffixProvider);
graph.addDictionaryItems(items);
return graph;
}
Aggregations