コード例 #1
0
        private void Summarize()
        {
            if (NumberOfReturnedSentences < 1)
            {
                NumberOfReturnedSentences = 1;
            }

            TextSummary textSummary = _summarizer.Summarize(InputText, NumberOfReturnedSentences);
            string summarizedText = textSummary.SummarizedText;

            var summary = new Summary(summarizedText, NumberOfReturnedSentences, textSummary.AllWordFrequency);

            Messenger.Default.Send(summary);
        }
コード例 #2
0
 ////public override void Cleanup()
 ////{
 ////    // Clean own resources if needed
 ////    base.Cleanup();
 ////}
 private void FillSummary(Summary summary)
 {
     SummarizedText = summary.SummarizedText;
     NumberOfSentences = summary.ReturnedSentences;
     WordFrequency = summary.WordFrequency.OrderBy(x => x.Key).ToDictionary(x => x.Key,x => x.Value);
 }