1. Install Python (I am installing Python2.7, directory C:\Python27)
can be downloaded to csdn, Oschina, Sina share and other websites
You can also download it on the Python website: http://www.python.org/
2. Install NumPy (optional)
Download here: Http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe
Note the PY version
EXE file after download (the program will automatically search the Python27 directory)
3. Install NLTK (i downloaded nltk-2.0.3)
Download here: HTTP://PYPI.PYTHON.ORG/PYPI/NLTK
Unzip the nltk-2.0.3 to the C:\Python27 directory
Open cmd, go to C:\Python27\nltk-2.0.3 directory (input: CD C:\Python27\nltk-2.0.3)
Input command: Python setup.py install
4. Install Pyyaml:
Download here: Http://pyyaml.org/wiki/PyYAML
Note the PY version
EXE file after download (the program will automatically search the Python27 directory)
5. Open idle, enter import NLTK, no error, it means the installation was successful.
Here, the basic Python modules required for NLP are already installed, and then the Nltk_data is installed.
There are several ways to download nltk_data, here I only introduce a
6. Proceed to fifth step, already import nltk, then enter Nltk.download (), so you can open a NLTK Downloader (NLTK Downloader)
7. Note the download Directory below the downloader, I set the C:\nltk_data
8. On computer-Properties-Advanced system Settings-advanced-environment variables-System variables-NEW: Top: Nltk_data, bottom: C:\nltk_data
9. Select the package (corpus, module) you want to download, you can download it all at once (I always appear out of date during the download), or you can download it individually (I'll do it ...). )
10. How to test the package after successful installation? Enter the statement below to do so.
BrownBrown. Words()[' The ', ' Fulton ', ' County ', ' Grand ', ' jury ', ' said ', ...]
Success "Offline installation Nltk_data Link: Http://pan.baidu.com/s/1gfA7UoV Password: 46qy from:http://www.cnblogs.com/cheesezh/archive/2012/11/05 /2756098.html
PYTHON-NLTK Environment Construction