示例#1
0
        // *** IStemmer interface implementation ***

        public string GetStem(string word)
        {
            Utils.ThrowException(word == null ? new ArgumentNullException("word") : null);
            mStemmer.SetCurrent(word);
            mStemmer.Stem();
            return(mStemmer.GetCurrent());
        }
示例#2
0
        // *** IStemmer interface implementation ***

        public string GetStem(string word)
        {
            Utils.ThrowException(word == null ? new ArgumentNullException("word") : null);
            try
            {
                ISnowballStemmer stemmer = CreateStemmer();
                stemmer.SetCurrent(word);
                stemmer.Stem();
                return(stemmer.GetCurrent());
            }
            catch { return(word); }
        }