Before getting started with the examples, we will set the system up with NLTK and other dependent Python libraries. The pip installer can be used to install NLTK, with an optional installation of numpy, as follows:
sudo pip install -U nltksudo pip install -U numpy
The NLTK corpora and various modules can be installed by using the common NLTK downloader in the Python interactive shell or a Jupyter Notebook, shown as follows:
The preceding command will open an NLTK Downloader, as follows. Select the packages or collections that are required:
As shown in the preceding screenshot, specific ...