python - sklearn CountVectorizer TypeError: refuses 'ngram_range' other than (1,1) -


is there bug in python 2.7.3 in sklearn countvectorizer? previous post mentioned earlier bug. here simple input , typeerror.

 >>> sklearn.feature_extraction.text import countvectorizer >>> ngram_vectorizer = countvectorizer(analyzer='char_wb', ngram_range=(2, 2)) traceback (most recent call last):   file "", line 1, in  typeerror: __init__() got unexpected keyword argument 'ngram_range' 

it possible have older version of sklearn installed. keyword argument ngram_range introduced in version 0.12 (e.g. not exist in version 0.11).


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -