We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f80241 commit 4a6b3c6Copy full SHA for 4a6b3c6
Ch4/03_Word2Vec_Example.ipynb
@@ -173,7 +173,7 @@
173
" mystopwords = set(stopwords.words(\"english\"))\n",
174
" def remove_stops_digits(tokens):\n",
175
" #Nested function that lowercases, removes stopwords and digits from a list of tokens\n",
176
- " return [token.lower() for token in tokens if token not in mystopwords and not token.isdigit()\n",
+ " return [token.lower() for token in tokens if token.lower() not in mystopwords and not token.isdigit()\n",
177
" and token not in punctuation]\n",
178
" #This return statement below uses the above function to process twitter tokenizer output further. \n",
179
" return [remove_stops_digits(word_tokenize(text)) for text in texts]\n",
0 commit comments