Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocess Issue #21

Open
liziming5353 opened this issue Mar 28, 2019 · 4 comments
Open

Preprocess Issue #21

liziming5353 opened this issue Mar 28, 2019 · 4 comments

Comments

@liziming5353
Copy link

When I am trying to fetching the WSJ+Gigaword model, my network is unreachable, so what's the problem please?

File "/home/lzm/AMRParsing/depparser.py", line 29, in parse
path_to_model = download_and_install_model(model_type,'./bllip-parser/models')
File "/home/lzm/.local/lib/python2.7/site-packages/bllipparser/ModelFetcher.py", line 124, in download_and_install_model
reporthook=status_func)
...
IOError: [Errno socket error] [Errno 101] Network is unreachable

@jiangweisuc
Copy link

jiangweisuc commented Apr 16, 2019

I have encountered the same problem as you, have you solved it?

@jiangweisuc
Copy link

jiangweisuc commented Apr 16, 2019

detail is as follow:

(python27) user@user-HP-Z4-G4-Workstation:~/AMR/camr$ python amr_parsing.py -m preprocess ~/AMR/camr/../data/test_data.txt
Start Stanford CoreNLP...
java -Xmx2500m -cp stanfordnlp/stanford-corenlp-full-2015-04-20/stanford-corenlp-3.5.2.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/stanford-corenlp-3.5.2-models.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/joda-time.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/xom.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/jollyday.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/protobuf.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/javax.json.jar:stanfordnlp/stanford-corenlp-full-2015-04-20/ejml-0.23.jar edu.stanford.nlp.pipeline.StanfordCoreNLP -props stanfordnlp/default.properties
Loading Models: 4/4
Read token,lemma,name entity file /home/user/AMR/camr/../data/test_data.txt.prp...

。。。。。

'\r\nNLP> \r\n'
Traceback (most recent call last):
File "amr_parsing.py", line 436, in
main()
File "amr_parsing.py", line 169, in main
instances = preprocess(amr_file,START_SNLP=True,INPUT_AMR=args.amrfmt, PRP_FORMAT=args.prpfmt)
File "/home/user/AMR/camr/preprocessing.py", line 504, in preprocess
dparser.parse(tok_sent_filename)
File "/home/user/AMR/camr/depparser.py", line 29, in parse
path_to_model = download_and_install_model(model_type,'./bllip-parser/models')
File "/home/user/.local/lib/python2.7/site-packages/bllipparser/ModelFetcher.py", line 124, in download_and_install_model
reporthook=status_func)
File "/home/user/.conda/envs/python27/lib/python2.7/urllib.py", line 245, in retrieve
fp = self.open(url, data)
File "/home/user/.conda/envs/python27/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/home/user/.conda/envs/python27/lib/python2.7/urllib.py", line 443, in open_https
h.endheaders(data)
File "/home/user/.conda/envs/python27/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/home/user/.conda/envs/python27/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/home/user/.conda/envs/python27/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/home/user/.conda/envs/python27/lib/python2.7/httplib.py", line 1255, in connect
HTTPConnection.connect(self)
File "/home/user/.conda/envs/python27/lib/python2.7/httplib.py", line 821, in connect
self.timeout, self.source_address)
File "/home/user/.conda/envs/python27/lib/python2.7/socket.py", line 575, in create_connection
raise err
IOError: [Errno socket error] [Errno 101] Network is unreachable

@jiangweisuc
Copy link

jiangweisuc commented Apr 18, 2019

OK, the reason why Network is unreachable lies the 'some place's internet policy'.
In 'preprocessing.py' and 'depparser.py' python file, the model name and the file address have been writen fixed, so one can use VPN to download the models.

@LeshengJin
Copy link

Use a VPN!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants