Example #1
0
 def decrement(self, k):
     switch = remove_random(self.switches[k])
     if switch:
         self.word_model.decrement(k)
     else:
         self.mp.decrement(k)
     self.switch_model.decrement(switch)
Example #2
0
 def decrement(self, word):
     p, s = remove_random(self.analyses[word])
     self.prefix_model.decrement(p)
     self.suffix_model.decrement(s)
Example #3
0
 def decrement(self, k):
     # Select assigned analysis randomly and remove it
     analysis = self.analyses[k][remove_random(self.assignments[k])]
     # Decrement models
     self.stem_model.decrement(analysis.stem)
     self.pattern_model.decrement(analysis.pattern)