use of zemberek.morphology.analysis.WordAnalysis in project zemberek-nlp by ahmetaa.
the class TurkishMorphologyFunctionalTests method testUnidentifiedWordNoVowel.
@Test
public void testUnidentifiedWordNoVowel() {
TurkishMorphology morphology = getMorphology();
WordAnalysis result = morphology.analyze("gnctrkcll");
Assert.assertEquals(0, result.analysisCount());
}
use of zemberek.morphology.analysis.WordAnalysis in project zemberek-nlp by ahmetaa.
the class TurkishMorphologyFunctionalTests method testRomanNumeral.
@Test
public void testRomanNumeral() {
TurkishMorphology morphology = getMorphology("dört [P:Num,Card;A:Voicing]");
WordAnalysis result = morphology.analyze("IV");
Assert.assertEquals(1, result.analysisCount());
Assert.assertEquals(SecondaryPos.RomanNumeral, result.getAnalysisResults().get(0).getDictionaryItem().secondaryPos);
}
use of zemberek.morphology.analysis.WordAnalysis in project zemberek-nlp by ahmetaa.
the class TurkishMorphologyFunctionalTests method testDate2.
@Test
public void testDate2() {
TurkishMorphology morphology = getMorphology("dört [P:Num,Card;A:Voicing]");
WordAnalysis result = morphology.analyze("1.1.2014'te");
Assert.assertEquals(1, result.analysisCount());
SingleAnalysis analysis = result.getAnalysisResults().get(0);
Assert.assertEquals(SecondaryPos.Date, analysis.getDictionaryItem().secondaryPos);
String lexical = analysis.formatLexical();
Assert.assertTrue(lexical.endsWith("A3sg+Loc"));
}
use of zemberek.morphology.analysis.WordAnalysis in project zemberek-nlp by ahmetaa.
the class TurkishMorphologyFunctionalTests method testRomanNumeral2.
@Test
public void testRomanNumeral2() {
// Instance with no dictionary item.
TurkishMorphology morphology = getMorphology("dördüncü [P:Num,Ord]");
WordAnalysis result = morphology.analyze("XXIV.");
Assert.assertEquals(1, result.analysisCount());
Assert.assertEquals(SecondaryPos.RomanNumeral, result.getAnalysisResults().get(0).getDictionaryItem().secondaryPos);
}
use of zemberek.morphology.analysis.WordAnalysis in project zemberek-nlp by ahmetaa.
the class TurkishMorphologyFunctionalTests method testDate.
@Test
public void testDate() {
TurkishMorphology morphology = getMorphology("dört [P:Num,Card;A:Voicing]");
WordAnalysis result = morphology.analyze("1.1.2014");
Assert.assertEquals(1, result.analysisCount());
Assert.assertEquals(SecondaryPos.Date, result.getAnalysisResults().get(0).getDictionaryItem().secondaryPos);
}
Aggregations