We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from spacy.lang.en.stop_words import STOP_WORDS as stopwords print(len(stopwords)) tfidf = TfidfVectorizer(stop_words=list(stopwords)) dt = tfidf.fit_transform(headlines["headline_text"]) dt
error message:
--------------------------------------------------------------------------- InvalidParameterError Traceback (most recent call last) Cell In[33], [line 4](vscode-notebook-cell:?execution_count=33&line=4) [2](vscode-notebook-cell:?execution_count=33&line=2) print(len(stopwords)) [3](vscode-notebook-cell:?execution_count=33&line=3) tfidf = TfidfVectorizer(stop_words=stopwords) ----> [4](vscode-notebook-cell:?execution_count=33&line=4) dt = tfidf.fit_transform(headlines["headline_text"]) [5](vscode-notebook-cell:?execution_count=33&line=5) dt
fix: tfidf = TfidfVectorizer(stop_words=list(stopwords)) or we could use tfidf = TfidfVectorizer(stop_words='english')
tfidf = TfidfVectorizer(stop_words=list(stopwords))
tfidf = TfidfVectorizer(stop_words='english')
there are several places where this has to be fixed in the chapter05 notebook
@christianw @datanizing
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
error message:
fix:
tfidf = TfidfVectorizer(stop_words=list(stopwords))
or we could use
tfidf = TfidfVectorizer(stop_words='english')
there are several places where this has to be fixed in the chapter05 notebook
@christianw @datanizing
The text was updated successfully, but these errors were encountered: