Ejemplo n.º 1
0
 def computeAggregation(self, words_dict):
     """
     Compute aggregation of this word
     @param words_dict frequency dict of all candidate words
     """
     parts = genSubparts(self.text)
     if len(parts) > 0:
         self.aggregation = min([self.freq/words_dict[p1_p2[0]].freq/words_dict[p1_p2[1]].freq for p1_p2 in parts])
Ejemplo n.º 2
0
 def computeAggregation(self, words_dict):
     """
     Compute aggregation of this word
     @param words_dict frequency dict of all candidate words
     """
     parts = genSubparts(self.text)
     if len(parts) > 0:
         self.aggregation = min(map(lambda (p1, p2): self.freq / words_dict[p1].freq / words_dict[p2].freq, parts))
Ejemplo n.º 3
0
 def computeAggregation(self, words_dict):
     """
     Compute aggregation of this word
     @param words_dict frequency dict of all candidate words
     """
     parts = genSubparts(self.text)
     if len(parts) > 0:
         self.aggregation = min(
             map(
                 lambda (p1, p2): self.freq / words_dict[p1].freq /
                 words_dict[p2].freq, parts))