Пример #1
0
 def update_support(self, fm: FARGModel):
     for consume in fm.search_ws(
         (Consume, CellRef, GettingCloser(taggee=None, target=self.target)),
             max_n=20):
         fm.set_support_edge(self,
                             consume,
                             weight=self.promisingness_of(fm, consume))
Пример #2
0
 def look(self, fm: FARGModel):
     # TODO Exclude nodes already tagged GettingCloser
     found = first(fm.search_ws(ImCell))
     #print('GettingCloser.Tagger FOUND', found)
     if found:
         weight = GettingCloser.calc_weight(found, self.target)
         if weight > 0.001:
             # TODO Indicate the Want node? The target?
             # TODO Indicate builder
             tag = fm.build(
                 GettingCloser(taggee=found,
                               target=self.target,
                               weight=weight))
             fm.add_mut_support(tag, found)