How to Solve NameError: name 'word_tokenize' is not defined -- nltk

Solution: Import the 'word_tokenize' module

To Solve the error, add the following line to the top of your code.

from nltk.tokenize import word_tokenize

 

For more information:
Python nltk word_tokenize