Install NLTK in Ubuntu12.04

Source: Internet
Author: User
Tags nltk nltk python
Before installing NLTK, run the apt-cachesearch command to search for the specific name of the NLTK package in the software source: $ apt-cachesearchnltk # search package python-nltk-Pythonlibrariesfornaturallanguageprocessing $ apt-cacheshowpython-nltk & nbs

Before installing NLTK, use the apt-cache search command to search for the specific name of the NLTK package in the software source:

$ Apt-cache search nltk # search software package

Python-nltk-Python libraries for natural language processing

$ Apt-cache show python-nltk # display version information/size, etc.

Package: python-nltk
Priority: optional
Section: universe/python
Installed-Size: 4042
Maintainer: Ubuntu Developers
Original-Maintainer: Robin Munn
Architecture: all
Source: nltk
Version: 2.0 ~ B9-0ubuntu3
Depends: python2.7, python (> = 2.7.1-0ubuntu2), python (<2.8), python-yaml
Suggests: python-numpy, python-matplotlib, prover9
Filename: pool/universe/n/nltk/python-nltk_2.0 ~ B9-0ubuntu3_all.deb
Size: 918844
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Note Depends/Suggests. Or run the following command:

$ Apt-cache depends python-nltk # understand specific dependent packages

Python-nltk
Dependency: python2.7
Dependency: python
Dependency: python
Dependency: python-yaml
Suggestion: python-numpy
Suggestion: python-matplotlib
Suggestion: prover9

After learning about it, start to install:

$ Sudo apt-get install python-nltk # install nltk

The following additional software packages will be installed:
Python-yaml libyaml-0-2
Recommended software packages:
Python-numpy python-matplotlib prover9
The following [new] software packages will be installed:
Libyaml-0-2 python-nltk python-yaml

To avoid other problems, install all the recommended packages:

$ Sudo apt-get install python-numpy

The following additional software packages will be installed:

Libblas3gf libgfortran3 liblapack3gf
Recommended software packages:
Python-numpy-doc python-numpy-dbg python-nose python-dev gfortran
The following [new] software packages will be installed:
Libblas3gf libgfortran3 liblapack3gf python-numpy

$ Sudo apt-get install python-matplotlib # used to draw charts

The following additional software packages will be installed:
Python-matplotlib-data python-pyparsing python-support python-tz ttf-lyx
Recommended software packages:
Dvipng ipython python-configobj python-excelerator python-matplotlib-doc
Python-qt3 python-qt4 python-scipy python-traits python-wxgtk2.8
Texlive-extra-utils texlive-latex-extra
The following [new] software packages will be installed:
Python-matplotlib-data python-pyparsing python-support
Python-tz ttf-lyx

$ Sudo apt-get install prover9

The following additional software packages will be installed:
Libladr4
Recommended software packages:
Ladr4-apps prover9-doc
The following [new] software packages will be installed:
Libladr4 prover9

$ Sudo apt-get install python-scipy # used by MaxentClassifier

The following additional software packages will be installed:
G ++-4.6 libamd2.2.0 libexpat1-dev libssl-dev libssl-doc
Libstdc ++ 6-4.6-dev libumfpack5.4.0 python-dev python2.7-dev zlib1g-dev
Recommended software packages:
G ++-multilib g ++-4.6-multilib gcc-4.6-doc libstdc ++ 6-4.6-dbg
Libstdc ++ 6-4.6-doc
The following [new] software packages will be installed:
G ++-4.6 libamd2.2.0 libexpat1-dev libssl-dev libssl-doc
Libstdc ++ 6-4.6-dev libumfpack5.4.0 python-dev python-scipy python2.7-dev
Zlib1g-dev
Now, the installation is complete. Open the Python interaction environment and import it to check whether the installation is successful.

Appendix:

Https://launchpad.net/ubuntu/+source/nltk

This website can download all the preceding deb installation packages.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.