private void InputTextBox_TextChanged(object sender, EventArgs e) { Bigrams.Clear(); Trigrams.Clear(); Stopwords.Items.Clear(); Top_10NoStops.Clear(); top_10_Stem.Clear(); Top_10Words.Clear(); Stem_NoStops.Clear(); }
private void Top10_wordsButton_Click(object sender, EventArgs e) { Top_10Words.Clear(); string raw_input = this.InputTextBox.Text; var doc_words = Program.GetDocList(raw_input); var list_docs = Program.TF_IDF(doc_words); var top10_words = list_docs.SelectMany(x => x).OrderBy(x => x.Value).Select(x => x.Key).Distinct().Take(10).ToList(); for (int i = 0; i < top10_words.Count; i++) { Top_10Words.Items.Add(top10_words[i]); } }