Search in sources :

Example 1 with MorphemeGroup

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());
}
Also used : MorphemeGroup(zemberek.morphology._analyzer._SingleAnalysis.MorphemeGroup) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MorphemeGroup (zemberek.morphology._analyzer._SingleAnalysis.MorphemeGroup)1