use of zemberek.core.turkish.PhoneticAttribute in project zemberek-nlp by ahmetaa.
the class StemTransitionsBase method generate.
/**
* Generates StemTransition objects from the dictionary item. <p>Most of the time a single
* StemNode is generated.
*
* @param item DictionaryItem
* @return one or more StemTransition objects.
*/
public List<StemTransition> generate(DictionaryItem item) {
if (specialRoots.contains(item.id)) {
return handleSpecialRoots(item);
}
if (hasModifierAttribute(item)) {
return generateModifiedRootNodes(item);
} else {
AttributeSet<PhoneticAttribute> phoneticAttributes = calculateAttributes(item.pronunciation);
StemTransition transition = new StemTransition(item.root, item, phoneticAttributes, morphotactics.getRootState(item, phoneticAttributes));
return Lists.newArrayList(transition);
}
}
Aggregations