Beispiel #1
0
 def stem_string(self, string):
     return regex.np_normalize(' '.join(self.stem(string.split())))
Beispiel #2
0
 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))