When I try to download StanfordNLP en model, it gives an error

Muhammad Abdullah

I am using Anaconda. First I installed StanfordNLP and when I execute the command

stanfordnlp.download('en')

it gives following error;

(base) C:\Users\Abdullah>python
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import stanfordnlp
>>> stanfordnlp.download('en')
Using the default treebank "en_ewt" for language "en".
Would you like to download the models for: en_ewt now? (Y/n)
y

Default download directory: C:\Users\Abdullah\stanfordnlp_resources
Hit enter to continue or type an alternate directory.
C:\Users\Abdullah\Downloads\New folder

Downloading models for: en_ewt
Download location: C:\Users\Abdullah\Downloads\New folder\en_ewt_models.zip
Traceback (most recent call last):
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 1321, in getresponse
    response.begin()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 296, in begin
    version, status, reason = self._read_status()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 257, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Users\Abdullah\Anaconda3\lib\socket.py", line 589, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 368, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\packages\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 1321, in getresponse
    response.begin()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 296, in begin
    version, status, reason = self._read_status()
  File "C:\Users\Abdullah\Anaconda3\lib\http\client.py", line 257, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Users\Abdullah\Anaconda3\lib\socket.py", line 589, in readinto
    return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\stanfordnlp\utils\resources.py", line 137, in download
    confirm_if_exists=confirm_if_exists, force=force, version=version)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\stanfordnlp\utils\resources.py", line 101, in download_ud_model
    r = requests.get(download_url, stream=True)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Abdullah\Anaconda3\lib\site-packages\requests\adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

I am new to NLP.

furas

If there is problem to download with

import stanfordnlp
stanfordnlp.download('en')

Then you can download it directly from web page StanfordNLP - Models and unpack to the folder which you see when you use stanfordnlp.download('en')

On Linux I got it in folder ~/stanfordnlp_resources/en_ewt_models/ and there are files

 en_ewt.pretrain.pt
 en_ewt_lemmatizer.pt
 en_ewt_parser.pt
 en_ewt_tagger.pt
 en_ewt_tokenizer.pt

BTW: I had no problem to download it with stanfordnlp.download() with version 0.2.0 but I had also old version 0.1.0 and it was trying to download from different url which doesn't exist any more. They moved files to different urls on server.

import stanfordnlp
print(stanfordnlp.__version__)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

First project in Django gives me an error when I try to start it

SQL or mariadb gives me this error when I try to create a table

My discord bot gives an error when I try send a message

Getting an error when I try to download images from a url with CURL

Django error:name '_' is not defined,when I try to create a new model

I created a subdomain and when I try to reach it , it gives access denied error

SourceTree gives me a login Error when I try to add my gitlab account

Google Apps Script gives error "Something Went Wrong" when I try to authorize my own code

How to setup inertia on my project, gives me an error when I try and load the login page

When i try to build apk(s) on android studio 3 it gives me error

When I try to add the Android SDK to my PATH, it gives a context error

QT gives error when I try to initialize QSerialPort outside the mainwindow.cpp

When i try to reshape, it gives me an error saying "TypeError: list indices must be integers or slices, not tuple"

when I try to paste jar files in lib folder (in eclipse) it gives the following error :

When I try to create a table in MySQL, it gives me error code 1215: “Cannot add foreign key constraint”

Why do I keep getting an error when I try to download only the audio of a Youtube video using pytube?

OpenNLP gives error when using Thai model

Error when i try to opendir

Why I am getting an error when i try to save form into quiz model with entity framework?

When i try to query django model by positive small integer field i get error

Why do I get an error when I try to save mongoose model?

When I try to save to ui colors with userDefaults, Xcode gives me the error : Fatal error: Unexpectedly found nil while unwrapping an Optional value

Why is there an error “invalid data input” when I try to test a successfully deployed ML model?

killed error in tensorflow when I try load convolutional pretrained model in jetson tx1

Error when I try to fit keras model in Google Colab with images on Google Drive

Why is the Visual Studio 2013 debugger closing without error when I try to expand Model properties?

IntelliJ IDE gives error when using Try-Catch with Resources

Pytest gives me an error when try to run a test

"activator.createinstance()" gives error when try to run