Search in sources :

Example 1 with StemTransitions

use of zemberek.morphology.analysis.StemTransitions in project zemberek-nlp by ahmetaa.

the class StemEndingGraph method generateStemGraph.

private CharacterGraph generateStemGraph() {
    CharacterGraph stemGraph = new CharacterGraph();
    StemTransitions stemTransitions = morphology.getMorphotactics().getStemTransitions();
    for (StemTransition transition : stemTransitions.getTransitions()) {
        if (transition.surface.length() == 0 || transition.item.primaryPos == PrimaryPos.Punctuation) {
            continue;
        }
        stemGraph.addWord(transition.surface, Node.TYPE_WORD);
    }
    return stemGraph;
}
Also used : StemTransition(zemberek.morphology.morphotactics.StemTransition) StemTransitions(zemberek.morphology.analysis.StemTransitions)

Aggregations

StemTransitions (zemberek.morphology.analysis.StemTransitions)1 StemTransition (zemberek.morphology.morphotactics.StemTransition)1