コード例 #1
0
        private IEnumerable <String> SplitNonQuote(string text)
        {
            var allSplits = new List <String>();
            var allWords  = text.Split(null).Select(w => w.ToLower().Trim()).
                            Where(s => !String.IsNullOrEmpty(s));
            var strategy = new GreedySplitStrategy();

            foreach (string word in allWords)
            {
                allSplits.AddRange(strategy.SplitWord(word, s => DoesWordExist(s,
                                                                               DictionaryOption.NoStemming)));
            }
            return(allSplits);
        }
コード例 #2
0
        private IEnumerable<String> SplitNonQuote(string text)
        {
            var allSplits = new List<String>();
            var allWords = text.Split(null).Select(w => w.ToLower().Trim()).
                Where(s => !String.IsNullOrEmpty(s));
            var strategy = new GreedySplitStrategy();

            foreach (string word in allWords)
            {
                allSplits.AddRange(strategy.SplitWord(word, s => DoesWordExist(s,
                    DictionaryOption.NoStemming)));
            }
            return allSplits;
        }