【发布时间】:2020-10-18 03:27:32
【问题描述】:
我只是尝试运行 stanfordnlp 自己给出的示例:
>>> import stanfordnlp
>>> stanfordnlp.download('en') # This downloads the English models for the neural pipeline
>>> nlp = stanfordnlp.Pipeline() # This sets up a default neural pipeline in English
>>> doc = nlp("Barack Obama was born in Hawaii. He was elected president in 2008.")
>>> doc.sentences[0].print_dependencies()
但是,我无法这样做,收到以下错误:
ConnectionError: HTTPSConnectionPool(host='nlp.stanford.edu', port=443): Max retries exceeded with url: /software/stanfordnlp_models/latest/en_ewt_models.zip (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8f5dba7f10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
为什么会这样?我看到这是一个问题on their github,但他们表示这是由于服务器问题已经解决了。我该如何解决这个错误?谢谢。
【问题讨论】:
标签: nlp data-science stanford-nlp