private async void btnClassifyFolder_Click(object sender, EventArgs e) { TrainingDataDialog.SelectedPath = @"C:\Users\anupams\imp\pers\Shared\CustomData"; if (TrainingDataDialog.ShowDialog() == DialogResult.OK) { var path = TrainingDataDialog.SelectedPath; ClassifyText ctext = new ClassifyText(_c45Tree, _featuresSelected); var results = await ctext.PredictAllDocumentClass(path, PrintResultToLog); PrintResultToLog(results); } }
private async void btnClassifyDocument_Click(object sender, EventArgs e) { openFileDialog1.CheckFileExists = true; openFileDialog1.CheckPathExists = true; openFileDialog1.Multiselect = false; if (openFileDialog1.ShowDialog() == DialogResult.OK) { var filePath = openFileDialog1.FileName; ClassifyText ctext = new ClassifyText(_c45Tree, _featuresSelected); var result = await ctext.PredictDocumentClass(filePath, PrintResultToLog); PrintResultToLog(result); } }