use of zemberek.morphology._analyzer.InterpretingAnalyzer 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());
}
use of zemberek.morphology._analyzer.InterpretingAnalyzer in project zemberek-nlp by ahmetaa.
the class AnalyzerTestBase method printDebug.
private static void printDebug(InterpretingAnalyzer analyzer, String input) {
AnalysisDebugData debugData = new AnalysisDebugData();
analyzer.analyze(input, debugData);
debugData.dumpToConsole();
}
Aggregations