I have written following code same as video but getting this error
corpus=[‘indian cricket team willwin the world cup says indian captain kohli’,
'indian pm says we will win lok sabha election ',
‘the movie raazi is an exciting indian thriller’,
‘the nobel won the hearts of the people’
]
def mytokenizer(sentence):
words = tokenizer.tokenize(sentence.lower())
return useful(words)
from sklearn.feature_extraction.text import CountVectorizer
cv=CountVectorizer(tokenizer=mytokenizer)
Vectorized_corpus=cv.fit_transform(corpus)
vc=Vectorized_corpus.toarray()
cv.inverse_transform[0]