Reading Documents From File When Using Sklearn.feature_extraction.text CountVectorizer
I am able to use code as in the example from the documentation, where the input to the fit_transform() function is a list of sentences, i.e: corpus = [ 'this is the first docume
Solution 1:
Set the vectorizer's input
constructor parameter to either filename
or file
. Its default value is content
, which assumes you've already read the files into memory.
Post a Comment for "Reading Documents From File When Using Sklearn.feature_extraction.text CountVectorizer"