How to Install NLTK in Python
NLTK (Natural Language Tool Kit) is a platform for building Python programs to work with human language data.
NLTK requires Python versions 3.5, 3.6, 3.7, or 3.8 in your system.
Mac/Unix
- Install NLTK: run
pip install --user -U nltk
- Install Numpy (optional): run
pip install --user -U numpy
- Test installation: run
python
then typeimport nltk
Windows
These instructions assume that you do not already have Python installed on your machine.
- Install NLTK: http://pypi.python.org/pypi/nltk
- Test installation:
Start>Python38
, then typeimport nltk
Installing NLTK Data
After installing the NLTK package, please do install the necessary datasets/models for specific functions to work.
If you’re unsure of which datasets/models you’ll need, you can install the “popular” subset of NLTK data, on the command line type python -m nltk.downloader popular
Subscribe
Login
Please login to comment
0 Discussion