- Hands-On Natural Language Processing with Python
- Rajesh Arumugam Rajalingappaa Shanmugamani
- 141字
- 2021-08-13 16:01:43
Installing NLTK and its modules
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 nltk
sudo 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:
import nltk
nltk.download()
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 collections, text corpora, NLTK models, or packages, can be selected and installed. Navigate to stopwords and install it for future use. The following is a list of modules that are required for this chapter's examples:

- Instant Node Package Manager
- oreilly精品圖書:軟件開發(fā)者路線圖叢書(共8冊)
- Java程序設(shè)計:原理與范例
- Modern JavaScript Applications
- Multithreading in C# 5.0 Cookbook
- INSTANT Adobe Edge Inspect Starter
- INSTANT Yii 1.1 Application Development Starter
- 編程改變生活:用Python提升你的能力(進(jìn)階篇·微課視頻版)
- Django 5企業(yè)級Web應(yīng)用開發(fā)實戰(zhàn)(視頻教學(xué)版)
- 石墨烯改性塑料
- Learning Python Data Visualization
- Mastering Concurrency in Python
- Learning Grunt
- 數(shù)字媒體技術(shù)概論
- Parallel Programming with Python