public string Stem(string word, StemOptions options) { var match = _regex.Matches(word).Cast <Match>().FirstOrDefault(); return(match == null ? word : word.Substring(0, match.Index) + replacements[match.Value]); }
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)); }
public StemmerFactory(StemOptions options, SupportedLanguage lang) { _lang = lang; _options = options; _stemmer = new IStem(); }