One of the libraries Python offers is the Natural Language Toolkit (NLTK) which includes various tools to simplify NLP programming. Installing this library on Ubuntu was, as always, less than automatic. In theory, you install the library and then enter in a python console and type "import nltk" - this should work with no errors shown. But...
Things I tried and failed:
- http://nltk.github.com/install.html - easy_install, pip, and various dependency errors.
- sudo apt-get install libyaml-dev
- sudo apt-get install python-yaml
- Uninstall and reinstall the pip libraries (?) - numpy and nltk. No dependency errors, but still didn't work.
- sudo apt-get install python-nltk - installed apparently correctly, but then didn't work.
- sudo apt-get remove python-nltk
- Repeat various times
- sudo pip remove nltk
- sudo pip remove numpy
- sudo apt-get remove python-nltk
At this point god knows what crap is installed on my system, but the bloody thing doesn't work. Googling revealed this page: http://www.nltk.org/download - and finally I got the thing installed:
- Download PyYAML: http://pyyaml.org/download/pyyaml/PyYAML-3.09.tar.gz
- Unzip into a temp directory (tar xvf ...)
- sudo python setup.py install
- Download NLTK: http://nltk.googlecode.com/files/nltk-2.0.1rc1.tar.gz
- Repeat steps 2 and 3.
No comments:
Post a Comment