private void checkSpamButton_Click(object sender, EventArgs e) { bool isSpam = BayesianFilter.AnalyzeMessage(string.Empty, this.messageTextbox.Text, "../../spam.txt", "../../ham.txt", "../../ignore.txt"); MessageBox.Show(string.Format("Result of prediction: {0}", (isSpam ? "Message is spam" : "Message is not spam"))); }
private void notSpamButton_Click(object sender, EventArgs e) { ActiveUp.Net.Mail.Message _message = new ActiveUp.Net.Mail.Message(); _message.BodyText.Text = this.messageTextbox.Text; BayesianFilter.ReportMessage(_message, "../../ham.txt"); }