You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/Lemmatization/Services/Adapters/LemmaLexer.cs

22 lines
459 B

using LemmaSharp;
using ZeroLevel.Services.Semantic;
namespace Lemmatization
{
public class LemmaLexer
: ILexer
{
private readonly ILemmatizer _lemmatizer;
public LemmaLexer()
{
_lemmatizer = new LemmatizerPrebuiltFull(LanguagePrebuilt.Russian);
}
public string Lex(string word)
{
return _lemmatizer.Lemmatize(word.Trim().ToLowerInvariant());
}
}
}

Powered by TurnKey Linux.