Nlp
NLP Knowledge and experiences
Last updated
Was this helpful?
NLP Knowledge and experiences
Last updated
Was this helpful?
Was this helpful?
import sklearn
from sklearn.feature_extraction.text import CountVectorizer
# instantiate an ngram counter
counts = CountVectorizer(analyzer='word', ngram_range=(n,n))
# create a dictionary of n-grams by calling `.fit`
vocab2int = counts.fit([a_text, s_text]).vocabulary_
CS 224N (Don't remember why i need this: 51506490)
https://www.fast.ai/