private void button6_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { Dictionary dictionary = new FrequentDictionary(openFileDialog1.FileName, 100); Console.WriteLine("Dictionary:"); Console.WriteLine(dictionary.ToString()); } }
private void button7_Click(object sender, EventArgs e) { Dictionary dictionary = new FrequentDictionary("Preprocessing\\" + PreprocessingConsts.SummaryFileName, 100); DirectoryInfo dirInfo = new DirectoryInfo(folderTextBox.Text); foreach (FileInfo fileInfo in dirInfo.GetFiles()) { Console.WriteLine(new BinaryDocument(fileInfo.FullName, dictionary, null)); } }
private void button11_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { String summaryFilePath = Application.StartupPath + "\\Preprocessing\\" + PreprocessingConsts.SummaryFileName; Dictionary dictionary = new FrequentDictionary(summaryFilePath, 100); TfIdfDocument doc = new TfIdfDocument(openFileDialog1.FileName, dictionary, null, new LearningDocInfo(folderTextBox.Text, summaryFilePath)); Console.WriteLine(doc); } }
private void button13_Click(object sender, EventArgs e) { String summaryFilePath = Application.StartupPath + "\\Preprocessing\\" + PreprocessingConsts.SummaryFileName; Dictionary dictionary = new FrequentDictionary(summaryFilePath, 100); DocumentList dl = new DocumentList(folderTextBox.Text, dictionary, DocumentRepresentationType.Own, null, null); foreach (Document doc in dl.GetDocumentList()) { Console.WriteLine(doc); } }