c-amr / camr

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

Pre-processing issue #16

Open berzentine opened 6 years ago

berzentine commented 6 years ago

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 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 "/usr2/home/nkvyas/TriggerModelling/AMRParsing/preprocessing.py", line 436, in preprocess proc1.setup() File "/usr2/home/nkvyas/TriggerModelling/AMRParsing/stanfordnlp/corenlp.py", line 358, in setup self.corenlp.expect("done.", timeout=20) # Load pos tagger model (~5sec) File "/usr2/home/nkvyas/TriggerModelling/AMRParsing/stanfordnlp/pexpect/init.py", line 1451, in expect timeout, searchwindowsize) File "/usr2/home/nkvyas/TriggerModelling/AMRParsing/stanfordnlp/pexpect/init.py", line 1466, in expect_list timeout, searchwindowsize) File "/usr2/home/nkvyas/TriggerModelling/AMRParsing/stanfordnlp/pexpect/init.py", line 1554, in expect_loop raise EOF(str(err) + '\n' + str(self)) stanfordnlp.pexpect.EOF: End Of File (EOF). Exception style platform. <stanfordnlp.pexpect.spawn object at 0x7f308fa601d0> version: 3.3 command: /usr/bin/java args: ['/usr/bin/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'] searcher: <stanfordnlp.pexpect.searcher_re object at 0x7f308fa60290> buffer (last 100 chars): '' before (last 100 chars): 's(ClassLoader.java:358)\r\n\tat sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)\r\n' after: <class 'stanfordnlp.pexpect.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 24394 child_fd: 3 closed: False timeout: 30 delimiter: <class 'stanfordnlp.pexpect.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1

unendin commented 6 years ago

This error can arise from using Java 9.x rather than 8.x with Stanford CoreNLP. Per the developers (https://stanfordnlp.github.io/CoreNLP/download.html), adding --add-modules java.se.ee to the startup command fixes things. In the camr codebase, the command is specified in stanfordnlp/corenlp.py line 443 (where it looks like you've already upped the memory option to 2500m). So: start_depparser = "%s -Xmx1800m -cp %s %s %s %s %s" can be changed to: start_depparser = "%s -Xmx1800m -cp %s --add-modules java.se.ee %s %s %s %s"

zy-zhangying commented 6 years ago

I have encountered the same problem as you, how do you solve it?

ieremiasviorel commented 5 years ago

I have switched from open-jdk 11 to oracle-jdk 8 on ubuntu 18 and it works.

goodmami commented 5 years ago

I've found that open-jdk 8 works, too. No need for the Oracle distribution. Just make sure you've purged your system of any newer JDK libraries if they were previously installed.

zy-zhangying commented 5 years ago

I tried it. I can achieve English AMR analysis,I can not achieve Chinese AMR analysis

------------------ 原始邮件 ------------------ 发件人: "Michael Wayne Goodman"notifications@github.com; 发送时间: 2019年5月23日(星期四) 下午4:43 收件人: "c-amr/camr"camr@noreply.github.com; 抄送: "zoey99"993464525@qq.com;"Comment"comment@noreply.github.com; 主题: Re: [c-amr/camr] Pre-processing issue (#16)

I've found that open-jdk 8 works, too. No need for the Oracle distribution. Just make sure you've purged your system of any newer JDK libraries if they were previously installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.