我想知道是否有人知道是否可以在Google colab中设置斯坦福Open IE,以及如何设置?
我之前已经遵循了CoreNLP客户端的colab教程,而且似乎可以正常工作。
当从他们的github(https://github.com/philipperemy/Stanford-OpenIE-Python)运行示例时,出现以下错误:
---------------------------------------------------------------------------
PermanentlyFailedException Traceback (most recent call last)
<ipython-input-2-01d7100eb03f> in <module>()
4 text = 'Barack Obama was born in Hawaii. Richard Manning wrote this sentence.'
5 print('Text: %s.' % text)
----> 6 for triple in client.annotate(text):
7 print('|-', triple)
8
3 frames
/usr/local/lib/python3.6/dist-packages/stanfordnlp/server/client.py in ensure_alive(self)
135 time.sleep(1)
136 else:
--> 137 raise PermanentlyFailedException("Timed out waiting for service to come alive.")
138
139 # At this point we are guaranteed that the service is alive.
PermanentlyFailedException: Timed out waiting for service to come alive.
任何建议,请感激:-)
启动服务器之前尝试此操作
%env NO_PROXY='localhost'
%env no_proxy='localhost'
我用stanza-corenlp测试了它。并且它解决了超时问题。