diff --git a/Ch4/03_Word2Vec_Example.ipynb b/Ch4/03_Word2Vec_Example.ipynb index 03a5016..a163318 100644 --- a/Ch4/03_Word2Vec_Example.ipynb +++ b/Ch4/03_Word2Vec_Example.ipynb @@ -173,7 +173,7 @@ " mystopwords = set(stopwords.words(\"english\"))\n", " def remove_stops_digits(tokens):\n", " #Nested function that lowercases, removes stopwords and digits from a list of tokens\n", - " 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", " and token not in punctuation]\n", " #This return statement below uses the above function to process twitter tokenizer output further. \n", " return [remove_stops_digits(word_tokenize(text)) for text in texts]\n",