参考网址:http://www.nltk.org/install.html
Mac/Unix
- Install NLTK: run
sudo pip install -U nltk
- Install Numpy (optional): run
sudo pip install -U numpy
- Test installation: run
python
then typeimport nltk
sudo pip install -U nltk
sudo pip install -U numpy
python
then type import nltk