Philips Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 19 July 2009

NLTK Installation with Python easy_install

Posted on 05:26 by Unknown

Few weeks ago I wrote the NLTK on Ubuntu Quick Start Guide. Now with the release of NLTK (Natural Language Toolkit) 2.0b5 today the NLTK installation has been greatly simplified thanks to the nltk python egg (See Changelog).




To get started with NLTK install, you first need the python-setuptools package.



$ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 195kB of archives.
After this operation, 909kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com karmic/main python-setuptools 0.6c9-0ubuntu4 [195kB]
Fetched 195kB in 9s (20.2kB/s)
Selecting previously deselected package python-setuptools.
(Reading database ... 106971 files and directories currently installed.)
Unpacking python-setuptools (from .../python-setuptools_0.6c9-0ubuntu4_all.deb) ...
Setting up python-setuptools (0.6c9-0ubuntu4) ...



Now lets install the NLTK with easy_install program.


$ sudo easy_install http://nltk.googlecode.com/files/nltk-2.0b5-py2.6.egg

Downloading http://nltk.googlecode.com/files/nltk-2.0b5-py2.6.egg
Processing nltk-2.0b5-py2.6.egg
creating /usr/local/lib/python2.6/dist-packages/nltk-2.0b5-py2.6.egg
Extracting nltk-2.0b5-py2.6.egg to /usr/local/lib/python2.6/dist-packages
Adding nltk 2.0b5 to easy-install.pth file

Installed /usr/local/lib/python2.6/dist-packages/nltk-2.0b5-py2.6.egg
Processing dependencies for nltk==2.0b5
Searching for PyYAML==3.08
Reading http://pypi.python.org/simple/PyYAML/
Reading http://pyyaml.org/wiki/PyYAML
Best match: PyYAML 3.08
Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.08.zip
Processing PyYAML-3.08.zip
Running PyYAML-3.08/setup.py -q bdist_egg --dist-dir /tmp/easy_install-T7Y0La/PyYAML-3.08/egg-dist-tmp-vRjvDM
build/temp.linux-i686-2.6/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.linux-i686-2.6/check_libyaml.c: In function ‘main’:
build/temp.linux-i686-2.6/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
build/temp.linux-i686-2.6/check_libyaml.c:5: error: (Each undeclared identifier is reported only once
build/temp.linux-i686-2.6/check_libyaml.c:5: error: for each function it appears in.)
build/temp.linux-i686-2.6/check_libyaml.c:5: error: expected ‘;’ before ‘parser’
build/temp.linux-i686-2.6/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared (first use in this function)
build/temp.linux-i686-2.6/check_libyaml.c:6: error: expected ‘;’ before ‘emitter’
build/temp.linux-i686-2.6/check_libyaml.c:8: warning: implicit declaration of function ‘yaml_parser_initialize’
build/temp.linux-i686-2.6/check_libyaml.c:8: error: ‘parser’ undeclared (first use in this function)
build/temp.linux-i686-2.6/check_libyaml.c:9: warning: implicit declaration of function ‘yaml_parser_delete’
build/temp.linux-i686-2.6/check_libyaml.c:11: warning: implicit declaration of function ‘yaml_emitter_initialize’
build/temp.linux-i686-2.6/check_libyaml.c:11: error: ‘emitter’ undeclared (first use in this function)
build/temp.linux-i686-2.6/check_libyaml.c:12: warning: implicit declaration of function ‘yaml_emitter_delete’

libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
modify the parameter include_dirs in setup.cfg)
zip_safe flag not set; analyzing archive contents...
Adding PyYAML 3.08 to easy-install.pth file

Installed /usr/local/lib/python2.6/dist-packages/PyYAML-3.08-py2.6-linux-i686.egg
Finished processing dependencies for nltk==2.0b5



Now you done, import the NLTK and start downloading the NTLK data.


$ python
Python 2.6.2+ (release26-maint, Jun 19 2009, 15:14:35)
[GCC 4.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>> nltk.download()
NLTK Downloader
---------------------------------------------------------------------------
d) Download l) List c) Config h) Help q) Quit
---------------------------------------------------------------------------
Downloader> l

Packages:
/usr/local/lib/python2.6/dist-packages/nltk-2.0b5-py2.6.egg/nltk/__init__.py:588: DeprecationWarning: object.__new__() takes no parameters
[ ] maxent_ne_chunker... ACE Named Entity Chunker (Maximum entropy)
[ ] abc................. Australian Broadcasting Commission 2006
[ ] brown............... Brown Corpus
[ ] alpino.............. Alpino Dutch Treebank
[ ] cess_cat............ CESS-CAT Treebank
[ ] brown_tei........... Brown Corpus (TEI XML Version)
[ ] cmudict............. The Carnegie Mellon Pronouncing Dictionary (0.6)
[ ] biocreative_ppi..... BioCreAtIvE (Critical Assessment of Information
Extraction Systems in Biology)
[ ] cess_esp............ CESS-ESP Treebank
[ ] chat80.............. Chat-80 Data Files
[ ] city_database....... City Database
[ ] conll2002........... CONLL 2002 Named Entity Recognition Corpus
[ ] conll2000........... CONLL 2000 Chunking Corpus
[ ] conll2007........... Dependency Treebanks from CoNLL 2007 (Catalan
and Basque Subset)
[ ] dependency_treebank. Dependency Parsed Treebank
[ ] floresta............ Portuguese Treebank
[ ] genesis............. Genesis Corpus
[ ] gazetteers.......... Gazeteer Lists
Hit Enter to continue:


Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Computational Linguistics, easy_install, Linux, NLP, NLTK, python, pythonegg, ubuntu | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Google Apps Script for Google Sites
    Google Apps Script started as functions for Google Spreadsheets. Today Apps Scripts have evolved into powerful development environment for e...
  • Naranda Muni Assocation
    Juan says 'I now dub thee, president arky ' Initiation into Hipatia community Browsing this blog on Nokia N95 at the IFFK in Kerala...
  • Acer Aspire One Battery Charging Problem
    If you believe amnesia is a malady that effects humans, think again. Recently a Acer Aspire One netbook landed on my table with a similar p...
  • PyCon India 2009
    Most action happens on conference sidelines PyCon India 2009 is no expection. You can always watch the recordings of talks later on. Catch...
  • Prayas The Tinkerer
    Ran into Prayas the tinkerer while in Bangalore. He introduced me to two of his really interesting projects. CANOPY: temporary roofs for t...
  • Free Software Camp for Ngo's and Civil Society Groups in Delhi, India
    Free Software Workshop for NGOs and Civil Society Groups Effectively compute and communicate in your local language using free and open sour...
  • Swathi Sangeethotsavam 2010
    The thunderstorm lasted all night, it was raining all sunday afternoon. The lake water is rising again, I resist the idea of going for a swi...
  • ALSA Jack Sense problem in Jaunty
    Update: Ubuntu Lucid user should read the this updated post Headphone jack sense problem in Ubuntu 10.04 Lucid Lynx instead. The newly or...
  • National Open Source Conference of Afghanistan (NOSCA) 2013
    This week National Open Source Conference of Afghanistan (NOSCA) starts in Jalalabad, Afghanistan. The event is organized by the National I...
  • Startup Investment Hour in Hanoi
    Opportunities abound for those who think big in Vietnam. Recently 5Desire , a local startup accelerator organized Startup Investment hour. T...

Categories

  • "compiz-fusion"
  • "film making"
  • "Graphic Design"
  • "martial art"
  • 01-18-2012
  • 10.04
  • 10.10
  • 3dprinting
  • 9.04
  • a11y
  • accerciser
  • accessibility
  • Activism
  • adobe
  • aegis
  • africa
  • AIR
  • alsa
  • Andhra Pradesh
  • android
  • angling
  • Animals
  • apache
  • apple
  • apport
  • Apps Script
  • architecture
  • ardour
  • arduino
  • ARM
  • art
  • audio description
  • bangalore
  • barcamp
  • barcamphanoi
  • barcampkl
  • barcamppp
  • barcampsaigon
  • barcampvte
  • bash
  • bcy2011
  • beercamp
  • biofuel
  • bittorrent
  • blackout
  • blender
  • blind
  • blogging
  • book
  • boot2gecko
  • braille
  • broadcom
  • bugs
  • bzr
  • Calicut
  • cambodia
  • canon
  • Canopy
  • cartoons
  • cat
  • CC
  • CDMA
  • censorship
  • CHDK
  • children
  • china
  • Chromium
  • Climate Change
  • cms
  • Comedy
  • comics
  • command line
  • compiz
  • Computational Linguistics
  • cpan
  • Creative Commons
  • cyanogenmod
  • DAISY
  • debian
  • delhi
  • design
  • dhvani
  • django
  • documentation
  • dontzap
  • dots
  • drupal
  • drush
  • earth hour
  • easy_install
  • eclipse
  • Ecuador
  • embedded linux
  • Environment
  • espeak
  • events
  • fennec
  • ffmpeg
  • film
  • film making
  • firefox
  • firefox3
  • firefox4
  • firefoxOS
  • firmware
  • fishing
  • fossasia
  • free culture
  • free software
  • fsfs
  • fx4
  • G1
  • gadgets
  • gdm
  • geek humour
  • Gimp
  • GISS
  • git
  • gnewsense
  • gnome
  • google
  • gta02
  • GUI Testing
  • hack
  • hackable1
  • hacker
  • handbrake
  • hanoi
  • hanoitweetup
  • hardware
  • hardy heron
  • hipatia
  • html5
  • humour
  • hunspell
  • ICANN41
  • iceweasel
  • identi.ca
  • iffk
  • IISE
  • india
  • Indian Languages
  • intel
  • interaction design
  • internet
  • intersat
  • Intrepid
  • Intrepid Ibex
  • ipod
  • jam
  • jaunty
  • Java
  • Javascript
  • josm
  • karmic
  • kerala
  • kernel
  • keyboard
  • kid
  • kiddy video
  • kids
  • kinect
  • kiosk
  • l10n
  • laos
  • launchpad
  • ldap
  • libreoffice
  • Linux
  • local weather
  • lucid
  • machine translation system
  • maemo
  • mallard
  • manga
  • maps
  • maverick
  • mediawiki
  • meego
  • mencoder
  • merkaartor
  • micro-blogging
  • midori
  • Mobile
  • moblin
  • mod_pagespeed
  • modem
  • mozcamp
  • mozilla
  • mplayer
  • music
  • mwc2012
  • myanmar
  • mymozl10n
  • mysql
  • n70
  • nature
  • nedumangad
  • neo freerunner
  • Neo1973
  • nepal
  • netbooks
  • NGO
  • NLP
  • NLTK
  • Nokia
  • Nonprofits
  • notify-osd
  • NUI
  • nvda
  • OLPC
  • ooffice
  • openDNS
  • openmoko
  • openNI
  • openOffice
  • openoffice.org
  • OpenStreetMap
  • orca
  • oscar
  • OSM
  • packaging
  • PDF
  • people
  • perl
  • Pets
  • photography
  • pipa
  • pokhara
  • postfix
  • potlatch
  • powershot
  • programming
  • pune
  • puppylinux
  • python
  • pythonegg
  • radio show
  • Recycling
  • red nose day
  • rms
  • RND
  • robots
  • rockbox
  • rubber
  • ruby
  • rural
  • s60
  • sahana
  • samba
  • samsung
  • scipy
  • security
  • SFD2011
  • shell
  • silk
  • singapore
  • skype
  • social media
  • software-center
  • softwarefreedomday
  • solar
  • solar eclipse
  • sopa
  • speakers
  • spins
  • stallman
  • startups
  • system-adminstration
  • t-shirt
  • tablet
  • tactile watch
  • tea shops
  • technology
  • tee
  • terminal
  • Testing
  • theatre
  • tibet
  • tracker
  • travel
  • trek
  • trekking
  • tux4kids
  • tuxmath
  • tv
  • tweets
  • twitter
  • ubuntu
  • UNR
  • uTouch
  • UX
  • UXA
  • vagrant
  • VCS
  • veli
  • vidarbha
  • video
  • virutalization
  • vsat
  • w3c
  • watches
  • water from dew
  • weather stations
  • weave
  • web automation
  • web standards
  • web testing
  • web2py
  • webmaker
  • Wiki
  • wikia
  • wikipedia
  • Windows
  • Windows XP
  • wordpress
  • wvdial
  • X-Window-System
  • X11
  • xorg
  • yelp
  • Zii
  • ZTE

Blog Archive

  • ►  2013 (17)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (2)
    • ►  May (3)
    • ►  April (1)
    • ►  March (1)
    • ►  February (5)
    • ►  January (2)
  • ►  2012 (26)
    • ►  December (3)
    • ►  November (1)
    • ►  October (1)
    • ►  July (1)
    • ►  June (3)
    • ►  May (6)
    • ►  April (1)
    • ►  March (8)
    • ►  January (2)
  • ►  2011 (43)
    • ►  December (2)
    • ►  November (7)
    • ►  October (8)
    • ►  September (4)
    • ►  August (5)
    • ►  June (1)
    • ►  February (6)
    • ►  January (10)
  • ►  2010 (73)
    • ►  December (17)
    • ►  November (5)
    • ►  October (10)
    • ►  September (3)
    • ►  August (8)
    • ►  July (9)
    • ►  June (4)
    • ►  March (5)
    • ►  February (7)
    • ►  January (5)
  • ▼  2009 (108)
    • ►  December (7)
    • ►  November (10)
    • ►  October (8)
    • ►  September (6)
    • ►  August (8)
    • ▼  July (4)
      • Better Gnome Desktop Magnification with eZoom
      • NLTK Installation with Python easy_install
      • GDM Timed Login
      • NLTK on Ubuntu Quick Start Guide
    • ►  June (5)
    • ►  May (6)
    • ►  April (15)
    • ►  March (15)
    • ►  February (9)
    • ►  January (15)
  • ►  2008 (33)
    • ►  December (33)
Powered by Blogger.

About Me

Unknown
View my complete profile