use of zemberek.morphology._analyzer._SingleAnalysis.MorphemeGroup in project zemberek-nlp by ahmetaa.
the class _SingleAnalysisTest method morphemeGroupTest.
@Test
public void morphemeGroupTest() {
InterpretingAnalyzer analyzer = getAnalyzer("kitap");
_SingleAnalysis analysis = analyzer.analyze("kitaplarda").get(0);
MorphemeGroup group = analysis.getGroup(0);
Assert.assertEquals("kitaplarda", group.surface());
analyzer = getAnalyzer("okumak");
analysis = analyzer.analyze("okutmuyor").get(0);
Assert.assertEquals(2, analysis.getMorphemeGroupCount());
MorphemeGroup group0 = analysis.getGroup(0);
Assert.assertEquals("oku", group0.surface());
MorphemeGroup group1 = analysis.getGroup(1);
Assert.assertEquals("tmuyor", group1.surface());
}
Aggregations