示例#1
0
        private void summarizeButton_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(headerTextBox.Text) || string.IsNullOrEmpty(bodyTextBox.Text))
            {
                MessageBox.Show("Please fill header and body!");
                return;
            }

            string summary = Summarizer.Execute(headerTextBox.Text, bodyTextBox.Text);

            MessageBox.Show("Summarizing done! Check summary.");

            summaryTextBox.Enabled  = true;
            summaryTextBox.ReadOnly = true;
            summaryTextBox.Text     = summary;
        }
示例#2
0
        static void Main(string[] args)
        {
            string article = "This is a really really really long and boring text.";

            Console.WriteLine(Summarizer.Summarize(article, 20));
        }