internal static EnglishWord CreateForTest(string text) { EnglishWord word = new EnglishWord(); word.Create(text); return(word); }
internal static EnglishWord CreateWithR1R2(string text) { EnglishWord result = CreateForTest(text); result._r1 = CalculateR(result.Stem, 0); result._r2 = CalculateR(result.Stem, result._r1.Start); return(result); }
public string StemWord(string word) { string tryValue; if (wordCache.TryGetValue(word, out tryValue)) { return(tryValue); } else { var stemmedWord = new EnglishWord(word).Stem; wordCache.TryAdd(word, stemmedWord); return(stemmedWord); } }