Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sentence = "Welcome to the codersarts tutorials, in this tutorials we will learns about lemmatization and stemming. I hope you can learn it very well and full constrations"
- # Tokenize: Split the sentence into words
- word_list = nltk.word_tokenize(sentence)
- print(word_list)
- # Lemmatize list of words and join
- lemmatized_output = ' '.join([lemmatizer.lemmatize(w) for w in word_list])
- print(lemmatized_output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement