Ejemplo n.º 1
0
        public string Stem(string word, StemOptions options)
        {
            _regex = new Regex(options.Pattern);

            var match = _regex.Matches(word).Cast <Match>().FirstOrDefault();

            return(match == null ? word : word.Substring(0, match.Index));
        }
Ejemplo n.º 2
0
 public StemmerFactory(StemOptions options, SupportedLanguage lang)
 {
     _lang    = lang;
     _options = options;
     _stemmer = new IStem();
 }