c-amr / camr

Transition-based tree-to-graph AMR Parser
GNU General Public License v2.0
125 stars 45 forks source link

Preprocess Issue #21

Open liziming5353 opened 5 years ago

liziming5353 commented 5 years ago

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 commented 5 years ago

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

jiangweisuc commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

Use a VPN!