Created
May 25, 2018 09:55
-
-
Save davidlenz/05b1b3eb5428fe461238e722c3d22711 to your computer and use it in GitHub Desktop.
Usage of german textblob lemmatizer. Takes a list of strings and returns the lemmatized version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from textblob_de import TextBlobDE as TextBlob | |
def textblob_lemmatizer(doclist): | |
"""Takes a list of strings as input and returns a list of lemmatized strings""" | |
docs=[] | |
for doc in doclist: | |
blob = TextBlob(doc) | |
docs.append(' '.join(list(blob.words.lemmatize()))) | |
return docs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment