Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Looking for duplicates. Lemmatization. Task 3. 4/5/2

a guest Apr 8th, 2020 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import nltk
  2. from nltk.stem import WordNetLemmatizer
  3. import pandas as pd
  4. feedback=pd.read_csv('/datasets/feedback_eng.csv')
  5. wordnet_lemma = WordNetLemmatizer()
  6. text = feedback['text'][1]
  7. word = nltk.word_tokenize(text)
  8. lemmas = [wordnet_lemma.lemmatize(w, pos = 'n') for w in word]
  9. print(lemmas)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top