如何手动下载节的模型?

理论上可以通过 Python 下载节的模型,如下所示mirror):


import stanza

stanza.download('en')       # This downloads the English models for the neural pipeline

但是,无法从我的计算机访问斯坦福服务器:


(neural-parser2) dernoncourt@ilcompn0:~/temp/stanza$ python

Python 3.6.7 (default, Oct 25 2018, 09:16:13)

[GCC 5.4.0 20160609] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import stanza

>>> stanza.download('en')

Downloading https://raw.githubusercontent.com/stanfordnlp/stanza-resources/master/resources_1.0.0.json: 115kB [00:00, 24.5MB/s]

2020-07-07 21:08:34 INFO: Downloading default packages for language: en (English)...

Traceback (most recent call last):

  File "/mnt/ilcodisk1/user/dernoncourt/pyenv/neural-parser2/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn

    (self._dns_host, self.port), self.timeout, **extra_kw

  File "/mnt/ilcodisk1/user/dernoncourt/pyenv/neural-parser2/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection

    raise err

  File "/mnt/ilcodisk1/user/dernoncourt/pyenv/neural-parser2/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection

    sock.connect(sa)

TimeoutError: [Errno 110] Connection timed out


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/mnt/ilcodisk1/user/dernoncourt/pyenv/neural-parser2/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen

    chunked=chunked,

  File "/mnt/ilcodisk1/user/dernoncourt/pyenv/neural-parser2/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request

    conn.request(method, url, **httplib_request_kw)

如何手动下载节的模型?我希望节的模型存储在多个服务器中。


我用stanza==1.0.1。


qq_遁去的一_1
浏览 98回答 1
1回答

肥皂起泡泡

我在 Twitter 上查看了斯坦福 NLP 小组,他们确认斯坦福 NLP 网站 ( https://nlp.stanford.edu/ ) 今天(7 月 8 日)由于斯坦福级数据中心的重组而关闭。他们明天(7 月 9 日)会回来,然后您的脚本应该会再次运行。他们现在还在 Twitter 上发布了这个:https://twitter.com/stanfordnlp/status/1280917602718461952?s=20
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python