I'm trying to set up a text classification model, that can split text into two categories. I've checked the shape of my arrays, and they're of the (n, ) format. But when I run my vectorizer command, I seem to run into this error. Any advice would be appreciated :)
x,y = dfclean\['text'\],dfclean\['class'\]
x.shape
> output = (19998,)
* * *
vectorizer = TfidfVectorizer(min_df=50,max_features=5000)
x = vectorizer.fit(x)
> AttributeError: lower not found
The Attribute error of type lower is probably occurring because you are trying to fit the vectorizer on your text data directly. I suggest to try to use the fit_transform method instead of the fit method. Such as: