I use TfidfVectorizer like this:
from sklearn.feature_extraction.text import TfidfVectorizer
stop_words = stopwords.words("english")
vectorizer = TfidfVectorizer(stop_words=stop_words, min_df=200)
xs['train'] = vectorizer.fit_transform(docs['train'])
xs['test'] = vectorizer.transform(docs['test']).toarray()
But when inspecting vectorizer.vocabulary_
I've noticed that it learns pure number features:
[(u'00', 0), (u'000', 1), (u'0000', 2), (u'00000', 3), (u'000000', 4)
I don't want this. How can I prevent it?