Exemplo n.º 1
0
        public Dictionary <string, string> AnalyzeDocuments()
        {
            Dictionary <string, string> results = new Dictionary <string, string>();

            results.Add("Jaccart", textAnalyzer.AnalyzeText(text, obfText));
            results.Add("LCS", lcsAnalyzer.AnalyzeText(text, obfText));
            results.Add("Cosine similarity", cosineAnalyser.AnalyzeText(text, obfText));

            return(results);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var textAnalyzer = new TextAnalyzer();

            //var text = string.Join(" ", Texts.SimpleSentences.Take(20));
            var text = Texts.ComplexSentences.ElementAt(3);

            foreach (var sentence in new[] { text })
            {
                var taggingReport  = textAnalyzer.AnalyzeText(sentence);
                var sentenceReport = new SentenceAnalyzer().Analyze(taggingReport);

                System.Console.WriteLine(taggingReport.GetSummary());
                System.Console.WriteLine(sentenceReport.GetSummary());
                System.Console.WriteLine();
                System.Console.WriteLine();
            }
        }