Пример #1
0
 private Result <IEnumerable <string> > GetWordsFromSource(IWordSource source)
 {
     return(Text.GetWords()
            .Then(words => words
                  .Select(w => w.ToLowerInvariant())
                  .Select(w => Regex.Replace(w, @"(\W|\d)", string.Empty, RegexOptions.Compiled))
                  .Where(w => !stopWords.GetWords().GetValueOrThrow().Contains(w))));
 }
Пример #2
0
        public IEnumerable <Word> GetWords(int quantityWords)
        {
            var words = wordsource.GetWords(quantityWords);

            return(words);
        }