def generateNodewithProptag(self,a_tag,arg_type): temp_tree = None if arg_type != []: temp_tree = tree.tree(a_tag+"|"+"|".join(arg_type)) else: temp_tree = tree.tree(a_tag) return temp_tree
def generateLeafwithProptag(self,a_tag,a_word,arg_type): temp_tree = None if arg_type != []: temp_tree = tree.tree(a_word +"|"+"|".join(arg_type)) temp_tree.word = a_word +"|"+"|".join(arg_type) else: temp_tree = tree.tree(a_word) temp_tree.word = a_word return temp_tree
def generateNodewithProptag(self,a_tag,arg_type,concept): concept = concept.lower() temp_tree = None if arg_type != [] and arg_type != ["name"]: temp_tree = tree.tree(concept+"|"+"|".join(arg_type)) elif arg_type == ["name"]: temp_tree = tree.tree(a_tag+"|"+"|".join(arg_type)) else: temp_tree = tree.tree(concept) return temp_tree