Пример #1
0
 def match_tree(self, tree, mark=False):
     if util.is_leaf(tree):
         return False
     for daughter in tree:
         if self.query.match_tree(daughter, mark):
             return True
     return False
Пример #2
0
 def match_tree(self, tree, mark=False):
     return util.is_leaf(tree) and tree.text == self.text