Nlp
NLP Knowledge and experiences
Python
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_
Resources
CS 224N (Don't remember why i need this: 51506490)
https://www.fast.ai/
Last updated
Was this helpful?