private KeyPhraseSummary GetKeyPhraseSummary(string keyPhrase, TopicKeywordExtractor tke) { var item = new KeyPhraseSummary(keyPhrase); item.WordCount = keyPhrase.Split(' ').Length; item.DocumentCount = tke.KeyPhraseTopics[keyPhrase].Count; item.Score = (tke.PhraseScore.ContainsKey(keyPhrase)) ? tke.PhraseScore[keyPhrase] : 0; return(item); }
private ListViewItem GetSingleKeyphraseListItem(KeyPhraseSummary keyPhraseSummary) { var item = new ListViewItem(); item.Tag = keyPhraseSummary; item.Text = keyPhraseSummary.Text; item.SubItems.AddRange(new string[] { keyPhraseSummary.DocumentCount.ToString(), keyPhraseSummary.Score.ToString(), keyPhraseSummary.WordCount.ToString() }); return(item); }