def stem_string(self, string): return regex.np_normalize(' '.join(self.stem(string.split())))
def get_string(tree=None): # Returns the normalized (lower-case) and stemmed string of the leaves of the tree words = [word for word in tree.leaves() if not word in ["-LRB-", "-RRB-"]] return regex.np_normalize(' '.join(words))