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/ZeroLevel/Services/Semantic/Contracts/README.txt

22 lines
924 B

6 years ago
The implementation of the basis for semantic work with the text.
6 years ago
6 years ago
LexProvider - implements the selection of tokens from the text, where a token is any coercion of a word.
For example, a token can be directly the word itself, a system, a lemma.
6 years ago
6 years ago
Two factories were created as an implementation:
6 years ago
6 years ago
SnowbolLexProviderFactory - returns providers based on stemming 'Snowball'
JustWordLexProviderFactory - returns a provider that takes the word itself for the token, no change (lower case)
6 years ago
6 years ago
To implement your own provider, you need to create a class based on the ILexer interface and implement the Lex method,
in which the necessary normalization of the word in the necessary semantic context will be carried out.
6 years ago
6 years ago
For example:
6 years ago
public class LemmaLexer: ILexer
{
6 years ago
public string Lex (string word) {return Lemmatizer.Lemma (word); }
6 years ago
}
6 years ago
Then you can create a provider based on it:
6 years ago
6 years ago
var provider = new LexProvider (new LemmaLexer ());

Powered by TurnKey Linux.