Ejemplo n.º 1
0
        public Result <IEnumerable <Tag> > CreateTagsCloud(IEnumerable <string> words)
        {
            var readyTags = words.AsResult()
                            .Then(WordHandler.NormalizeAndExcludeBoringWords)
                            .Then(WordConverter.ConvertToTags)
                            .ReplaceError(err => "MyStem.exe not found! " +
                                          "Please, go to: http://download.cdn.yandex.net/mystem/mystem-3.0-win7-32bit.zip"
                                          )
                            .Then(InsertTagsInFrames)
                            .Then(tags => tags.OrderByDescending(t => t.Frequency).AsEnumerable());

            Layouter.Reset();
            return(readyTags);
        }