-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Parsing fails on AssertionError when using OpenIE (v3.9.2) #1082
Comments
could be related to https://github.com/stanfordnlp/CoreNLP/issues/804 |
It doesn't seem to happen in the latest version. Would you let us know if
you find an example that crashes the latest version? I'm not sure if it's
been fixed or just the graph has changed in a way that no longer triggers
the error for this sentence.
|
Is there some reason you can't update? |
Thanks John. Updating to v4 was a low priority task for now but we bumped it up, did a quick demo and indeed the error has been resolved in v4. No other errors present for now and I will happily update if otherwise. |
I'm hoping this comment goes in, even though the issue is closed. I'm using version 4.3.2 and still having the problem listed. My code is similar to what is shown in the example. Here's the stack trace:
The paragraph I sent it was: |
I'm afraid "similar" doesn't narrow it down enough. I did this and it didn't crash. If you can be more specific about how to cause the crash, I'll try to fix it.
|
Sorry. Here's my code that calls it:
I see that you use 'CoreDocument' instead of 'Annotation'. Would that make a difference? |
I'm still not able to trigger it. Are you certain this is version 4.3.2, with the text I just posted in my example? If you run that example, does it cause an error? |
OK - what worked was removing the 'ea' flag, as suggested in issue 804. But yes, I am running version 4.3.2. |
That's a pretty crap workaround. However, I can't figure out how to reproduce this issue. What I have done is put a more detailed exception into our dev branch: Are you able to rebuild the source tree including this change and retry the query which is causing you problems? I can also prepare an interim release if that would make it easier to run this. We really should figure out what's causing the error... |
I built a sample distribution to accommodate some other issues as well: https://nlp.stanford.edu/software/stanford-corenlp-4.3.2b.zip Would you try the text that was causing you problems, then report the error if it produces an error? I'd like to actually fix this rather than just ignore it |
I took your jar and substituted it for the one I was using in my code and saw no difference when I readded the 'ea' flags. So, I tried to minimize the differences by adding the 'ea' flags to the corenlp.sh file:
I put my text into the input.txt file. I then called it with the annotators I was trying to use:
I still got the same error. |
The newer jar should have a lot more explanation of what the error is,
though. Can you pass that information back to me?
…On Tue, Dec 7, 2021 at 12:54 PM amracel ***@***.***> wrote:
I took your jar and substituted it for the one I was using in my code and
saw no difference when I readded the 'ea' flags. So, I tried to minimize
the differences by adding the 'ea' flags to the corenlp.sh file:
#java -mx5g -cp "$scriptdir/*" edu.stanford.nlp.pipeline.StanfordCoreNLP $*
java -ea -mx5g -cp "$scriptdir/*" edu.stanford.nlp.pipeline.StanfordCoreNLP $*
I then called it with the annotators I was trying to use:
./corenlp.sh -annotators tokenize,ssplit,pos,lemma,ner,depparse,coref,natlog,openie -file input.txt
I still got the same error.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWJU24CGSNZAUEO44P3UPZX6VANCNFSM4QSBXSWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
It doesn't seem to:
|
Actually I guess the easiest would be, can you send me input.txt? I can
delete it as soon as I'm done if needed. If you want to send it privately,
my email address should be on my account
…On Tue, Dec 7, 2021 at 2:43 PM amracel ***@***.***> wrote:
It doesn't seem to:
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words-distsim.tagger ... done [0.6 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [1.1 sec].
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [0.4 sec].
[main] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [0.4 sec].
[main] INFO edu.stanford.nlp.time.JollyDayHolidays - Initializing JollyDayHoliday for SUTime from classpath edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1.
[main] INFO edu.stanford.nlp.time.TimeExpressionExtractorImpl - Using following SUTime rules: edu/stanford/nlp/models/sutime/defs.sutime.txt,edu/stanford/nlp/models/sutime/english.sutime.txt,edu/stanford/nlp/models/sutime/english.holidays.sutime.txt
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 580705 unique entries out of 581864 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_caseless.tab, 0 TokensRegex patterns.
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 4867 unique entries out of 4867 from edu/stanford/nlp/models/kbp/english/gazetteers/regexner_cased.tab, 0 TokensRegex patterns.
[main] INFO edu.stanford.nlp.pipeline.TokensRegexNERAnnotator - ner.fine.regexner: Read 585572 unique entries from 2 files
[main] INFO edu.stanford.nlp.pipeline.NERCombinerAnnotator - numeric classifiers: true; SUTime: true [no docDate]; fine grained: true
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator depparse
[main] INFO edu.stanford.nlp.parser.nndep.DependencyParser - Loading depparse model: edu/stanford/nlp/models/parser/nndep/english_UD.gz ... Time elapsed: 0.9 sec
[main] INFO edu.stanford.nlp.parser.nndep.Classifier - PreComputed 20000 vectors, elapsed Time: 1.133 sec
[main] INFO edu.stanford.nlp.parser.nndep.DependencyParser - Initializing dependency parser ... done [2.0 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator coref
[main] INFO edu.stanford.nlp.coref.statistical.SimpleLinearClassifier - Loading coref model edu/stanford/nlp/models/coref/statistical/ranking_model.ser.gz ... done [0.8 sec].
[main] INFO edu.stanford.nlp.pipeline.CorefMentionAnnotator - Using mention detector type: dependency
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator natlog
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator openie
[main] INFO edu.stanford.nlp.naturalli.ClauseSplitter - Loading clause splitter from edu/stanford/nlp/models/naturalli/clauseSearcherModel.ser.gz ... done [0.027 seconds]
Processing file /Users/anneracel/Downloads/stanford-corenlp-4.3.2b/input.txt ... writing to /Users/anneracel/Downloads/stanford-corenlp-4.3.2b/input.txt.out
Exception in thread "main" java.lang.AssertionError
at edu.stanford.nlp.naturalli.Util.cleanTree(Util.java:324)
at edu.stanford.nlp.naturalli.OpenIE.annotateSentence(OpenIE.java:474)
at edu.stanford.nlp.naturalli.OpenIE.lambda$annotate$2(OpenIE.java:558)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at edu.stanford.nlp.naturalli.OpenIE.annotate(OpenIE.java:558)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:76)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:655)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:665)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:1263)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:1097)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.run(StanfordCoreNLP.java:1363)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.main(StanfordCoreNLP.java:1432)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWMXX6Z7CVF7CNNF5HLUP2EXVANCNFSM4QSBXSWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
The jar not being updated was my mistake. A couple other changes were included, but not the new exception. If you're willing to try again, I updated the jar for sure this time. Or just sending us the input.txt you used to trigger the error would help, especially if it can be triggered just by running the StanfordCoreNLP main program. |
I emailed you the file I was using. |
Why can I not reproduce this no matter what I do? Aaaagh I did this:
I did this:
with Dumb question maybe, are you sure the models you're using are the ones that ship with the latest release? Or perhaps the "beta" release I sent you a couple days ago? I updated the beta release so that contains the more detailed error message: https://nlp.stanford.edu/software/stanford-corenlp-4.3.2b.zip |
What JDK and platform are you using, btw? Not sure I'll be able to recreate exact conditions, and hopefully the results don't actually change across platforms anyway... |
Honestly I don't know why it's using EnhancedPlusPlus dependencies when it's insisting that the graph be a tree, which is simply not necessarily the case for EPP as far as I know |
Ah crud, I just realized my extra debugging code was applied to stripPrepCases, which isn't even called anywhere in the code that I see. I hate this particular annotator so much |
Oh thank goodness. I can finally reproduce the error. Sorry for the wasted time :/ |
Operating environment: Macbook Pro running macOS Monterey, version 12.0.1
|
Alright, something went wrong with our unit tests, which I need to figure out. However, I updated the above link to not crash on this specific sentence, at least. How do you feel about being a guinea pig? |
Oink oink? I don't mind. |
That's a different kind of pig! The fix should be here: https://nlp.stanford.edu/software/stanford-corenlp-4.3.2b.zip |
Huzzah! That worked! |
Excellent! We will include it as an official addition to the next release
soon.
…On Tue, Dec 14, 2021 at 9:22 AM amracel ***@***.***> wrote:
Huzzah! That worked!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWLMQ2VFEJRSP6DNEJTUQ54LZANCNFSM4QSBXSWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
4.4.0 now released |
Happens with the following sentence, under version 3.9.2, only when adding openIE annotator:
stack trace:
java.lang.AssertionError at edu.stanford.nlp.naturalli.Util.cleanTree(Util.java:324) at edu.stanford.nlp.naturalli.OpenIE.annotateSentence(OpenIE.java:463) at edu.stanford.nlp.naturalli.OpenIE.lambda$annotate$2(OpenIE.java:547) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at edu.stanford.nlp.naturalli.OpenIE.annotate(OpenIE.java:547) at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:76) at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:637) at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:629)
to replicate:
works fine if openie is disabled, with other sentences, or when using https://corenlp.run/ so looks like it's fixed in later versions but I did not verify it locally as I can't upgrade at the moment anyway.
advice much appreciated
The text was updated successfully, but these errors were encountered: