Morphological analyzer for RU and UK (in future) language. Written based on the ideas in the .
- Build normal form
var fishParse = Analyzer.Parse("рыбе").First();
var normalForm = fishParse.NormalForm; // рыба
- Inflect word by specified parameters
var fishInPluralAndAccusative = Analyzer.Inflect(fishParse,
new InflectOptions {
Number = Number.Plural, // plural number and accusative case
Case = Case.Accusative
}
);
var s = fishInPluralAndAccusative.RawWord; // рыб
- Get grammar info about word (part of speech, animacy, aspect, case, gender, involvement, mood, number, person, tense, transitivity and voice)
fishParse.PartofSpeech; // PartofSpeech.Noun
fishParse.Animacy; // Animacy.Animated
fishParse.Aspect; // null (null value means that the aspect is not specified or not applicable for this word)
fishParse.Case; // Case.Dative
fishParse.Gender; // Gender.Feminine
fishParse.Number; // Number.Single
It uses OpenCorpora dictionary, for unknown words makes predictions, based on hyphens, known prefixes e.t.c. Most of the implementation is taken from .
- UK dictionary
- Improve prediction for unknown words
- Docs and Nuget package maybe...