Having problems with installing nltk data

1,725 views
Skip to first unread message

sangeetha karuvath

unread,
Aug 29, 2010, 5:29:40 AM8/29/10
to nltk-...@googlegroups.com
Hello

I am having problems with installing the nltk-data.
I am getting connection timed out. There is no problem with the internet connection at my side.
Then I tried manually installing.

I am working in Ubuntu 9.
This is the error I am getting after manually downloading each file.

>>> import nltk
>>> from nltk.corpus import brown
>>> brown.words()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/nltk/corpus/util.py", line 68, in __getattr__
    self.__load()
  File "/usr/local/lib/python2.6/dist-packages/nltk/corpus/util.py", line 56, in __load
    except LookupError: raise e
LookupError:
**********************************************************************
  Resource 'corpora/brown' not found.  Please use the NLTK
  Downloader to obtain the resource: >>> nltk.download().
  Searched in:
    - '/home/geetha/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************

Please help



Regards
Sangeetha
Research scholar
Computer Science and Engineering
IIT Madras


sangeetha karuvath

unread,
Aug 29, 2010, 5:30:59 AM8/29/10
to nltk-...@googlegroups.com
Hello

I am having problems with installing the nltk-data.
I am getting connection timed out. There is no problem with the internet connection at my side.

Avinesh PVS

unread,
Aug 29, 2010, 5:40:36 AM8/29/10
to nltk-...@googlegroups.com
Hi,

I am having problems with installing the nltk-data.
I am getting connection timed out. There is no problem with the internet connection at my side.

May it is because of the proxy settings.

1) Find out the proxy settings.

2) Add this line in your  ~/.bashrc file.
    "export http_proxy=http://ip:port"

3) source ~/.bashrc

I am working in Ubuntu 9.
This is the error I am getting after manually downloading each file.

 
>>> import nltk
>>> from nltk.corpus import brown
>>> brown.words()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/nltk/corpus/util.py", line 68, in __getattr__
    self.__load()
  File "/usr/local/lib/python2.6/dist-packages/nltk/corpus/util.py", line 56, in __load
    except LookupError: raise e
LookupError:
**********************************************************************
  Resource 'corpora/brown' not found.  Please use the NLTK
  Downloader to obtain the resource: >>> nltk.download().
  Searched in:
    - '/home/geetha/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************

If you have manually downloaded put your corpus in the following directories.

    - '/home/geetha/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'

It should work.

Hope I answered your query.

Regards
 -Avinesh

Sangeetha

unread,
Aug 30, 2010, 4:05:46 AM8/30/10
to nltk-users


On Aug 29, 2:40 pm, Avinesh PVS <avinesh....@gmail.com> wrote:
> Hi,
>
> I am having problems with installing the nltk-data.
>
> > I am getting connection timed out. There is no problem with the internet
> > connection at my side.
>
> May it is because of the proxy settings.
>
> 1) Find out the proxy settings.
>
> 2) Add this line in your  ~/.bashrc file.
>     "export http_proxy=http://ip:port"
>
> 3) source ~/.bashrc
>
> I am working in Ubuntu 9.
>
>
Thanks Avinesh, its working now. Yes it was a problem with the proxy
settings.
Reply all
Reply to author
Forward
0 new messages