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

Pre-processing issue #16

Open
berzentine opened this issue Mar 26, 2018 · 5 comments
Open

Pre-processing issue #16

berzentine opened this issue Mar 26, 2018 · 5 comments

Comments

@berzentine
Copy link

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
Copy link

unendin commented Apr 12, 2018

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
Copy link

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

@ieremiasviorel
Copy link

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

@goodmami
Copy link

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
Copy link

zy-zhangying commented May 23, 2019 via email

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

5 participants