Simple way to install NLTK with optionals in Fedora
You can go to http://www.nltk.org and download NLTK and all the extras – pyyaml, matplotlib, etc. However, these packages are now in the Fedora repositories which makes it a dead simple task to install.
$ sudo yum install python-nltk

You get PyYAML, python-dateutil, python-matplotlib, and all the fix’ins installed as dependencies. This works at least as far back as Fedora 12.
Now run nltk.download() to fetch any corpora you need.
|
1 2 3 4 5 6 7 |
>>> import nltk >>> nltk.__dict__.keys() ['GoodTuringProbDist', 'chain', 'parse_cfg_production', 'skip', 'bracket_parse', 'FeatStruct', 'ProbabilisticProjectiveDependencyParser', 'entropy', 'types', 'parse_cfg', 'remove_variables', 'pprint', 'ngrams', 'parse_pcfg_production', 'config_weka', 'log_likelihood', 'rename_variables', 'LazyMappedChain', 'FeatDict', 'SubstituteBindingsSequence', ... |
>>> nltk.download()
