Exemple #1
0
 public static List<String> getRepresentives( Topic t )
 {
     List<Node> trieWords = t.fringeTrie.getAll();
     trieWords.Sort(( n1 , n2 ) => n2.getNumOfAppearances() - n1.getNumOfAppearances());
     List<String> results = new List<String>();
     for ( int i = 0 ; i < Configurations.TOPIC_VECTOR_SIZE ; i++ ) {
         Node n = trieWords[i];
         results.Add(n.ToString() + " " + String.Format("{0:0.#####}" , ( n.getNumOfAppearances() / (double)t.fringeTrie.weight )));
     }
     return results;
 }
 public OrlySuggester( Topic topic , double sigma = 1 )
     : base(topic.fringeTrie)
 {
     this.sigma = sigma;
     this.topic = topic;
 }