Help needed in downloading Brown corpus

Shashank Singh shashank.sunny.singh at gmail.com
Sat May 1 09:37:28 EDT 2010


try this:

run this in your terminal before you hit nltk.download().
Don't forget to set username, password and proxy info for your own
system.(in PROXY_INFO)

import urllib2

PROXY_INFO = {
  'user' : username,
  'pass' : password,
  'host' : proxy_server,
  'port' : proxy_port
}

proxy_support = urllib2.ProxyHandler({"http" : \
    "http://%(user)s:%(pass)s@%(host)s:%(port)d" % PROXY_INFO})
opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler)

urllib2.install_opener(opener)

HTH

On Sat, May 1, 2010 at 6:58 PM, Adil Kaleem <kaleem.adil at gmail.com> wrote:

> Hi all
> I'm a masters student in NLP. I needed to download the Brown corpus.
> I'm unable to download from nltk.org with the python CLI. My network
> connection is behind a proxy server so it's creating a problem. Since
> I don't know a bit of python, so unable to figure a way out. Can
> someone help me in this regard either how to solve my downloading
> problem or how to get Brown Corpus from some other link.
> Thanks in advance.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Regards
Shashank Singh
Senior Undergraduate, Department of Computer Science and Engineering
Indian Institute of Technology Bombay
shashank.sunny.singh at gmail.com
http://www.cse.iitb.ac.in/~shashanksingh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100501/dd2b4666/attachment-0001.html>


More information about the Python-list mailing list