Python TfidfVectorizer throwing : empty vocabulary; perhaps the documents only contain stop words"
问题 I'm trying to use Python's Tfidf to transform a corpus of text. However, when I try to fit_transform it, I get a value error ValueError: empty vocabulary; perhaps the documents only contain stop words. In [69]: TfidfVectorizer().fit_transform(smallcorp) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-69-ac16344f3129> in <module>() ----> 1 TfidfVectorizer().fit_transform(smallcorp) /Users/maxsong/anaconda