public void PrintSummary(TextModel summary)
        {
            Console.WriteLine('\n');

            for (int i = 0; i < summary.GetSentenceCount(); i++)
            {
                String outputSentence = " - " + summary.GetSentenceAsAString(i);

                Console.WriteLine(outputSentence);
            }
        }
Пример #2
0
        /// <summary>
        /// Gets the count of sentences which are both in the generated text and the human summarized text
        /// </summary>
        /// <param name="humanSummaryText"></param>
        /// <returns>count of sentences which exist in both texts</returns>
        private int GetBaseSentenceCount(TextModel humanSummaryText)
        {
            int baseSentenceCount = 0;

            var humanGeneratedSummarySentences = humanSummaryText.GetSentencesAsStrings();

            for (int i = 0; i < _genratedSummary.GetSentenceCount(); i++)
            {
                var generatedSentence = _genratedSummary.GetSentenceAsAString(i);

                if (humanGeneratedSummarySentences.Contains(generatedSentence))
                {
                    baseSentenceCount++;
                }
            }
            return(baseSentenceCount);
        }