Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ch4/03_Word2Vec_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down