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

Solution: Import the 'LancasterStemmer' module

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

from nltk.stem.lancaster import LancasterStemmer

 

For more information:
Python nltk LancasterStemmer