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); }
////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); }