Closed rpinquie closed 5 years ago
I wrote a new function in corenlp.py
def lemmatization(self, sentence): r_dict = self._request('lemma', sentence) words = [] lemmas = [] for s in r_dict['sentences']: for token in s['tokens']: words.append(token['originalText']) lemmas.append(token['lemma']) return list(zip(words, lemmas))
I can't figure out how to get the lemma for each token. Any idea?