python – Iterable over raw text documents expected, string object received
The cause of this problem is that input is just a string, but what is needed is a list (or an iterable) containing a single element (which is nothing but the string itself).
The error can be removed by adding the following line:
X_new_counts = count_vect.transform(input.plot_movie)
Input should be in Square Brackets.
input = [input] cv = CountVectorizer() cv.fit(input)