Skip to content

JaleChaki/MorphAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MorphAnalyzer

Morphological analyzer for RU and UK (in future) language. Written based on the ideas in the pymorphy2.

Features

  1. Build normal form
var fishParse = Analyzer.Parse("рыбе").First();
var normalForm = fishParse.NormalForm; // рыба
  1. 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; // рыб
  1. 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

How it works

It uses OpenCorpora dictionary, for unknown words makes predictions, based on hyphens, known prefixes e.t.c. Most of the implementation is taken from pymorphy2.

Future plans

  1. UK dictionary
  2. Improve prediction for unknown words
  3. Docs and Nuget package maybe...

About

Morphological analyzer for RU and UK languages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages