Beispiel #1
0
 def trees_from_forest(f):
     @peekable
     def dummy(s):
         yield s
     try:
         children = (trees_from_hyp(hyp) for hyp in f.incoming)
         return merge_lists(children)
     except AttributeError:
         children = dummy(dummy(KbestResult(0,{},f)))
         return merge_lists(children)
Beispiel #2
0
 def trees_from_forest(f):
     children = (trees_from_hyp(hyp) for hyp in f.incoming)
     return merge_lists(children)