private void TestFile(string soubor) { if (_filter == null) { MessageBox.Show("Napred nactete data!"); return; } string text = new StreamReader(soubor).ReadToEnd(); txtOut.Text = soubor + Environment.NewLine + "score: " + _filter.Test(text).ToString(); txtOut.AppendText(Environment.NewLine + Environment.NewLine + text); }
private void TestFile(string file) { if (_filter == null) { MessageBox.Show("Load first!"); return; } string body = new StreamReader(file).ReadToEnd(); txtOut.Text = file + Environment.NewLine + "score: " + _filter.Test(body).ToString(); txtOut.AppendText(Environment.NewLine + Environment.NewLine + body); }
/// <summary> /// Scores a text /// </summary> /// <param name="text"></param> /// <returns></returns> public double Classify(string text) { return(filter.Test(text)); }