-
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
QuoteAttribution Exceptions #554
Comments
I'm one of the creators of the quote attribution annotator. Unfortunately we have all left Stanford and so have other jobs on our plates at the moment. I will check up on this during the day tomorrow and try to provide some guidance. |
Thanks, I really appreciate any insight you can provide. The feature is pivotal for a professional project, but I plan to commit any CoreNLP improvements that come as a result. |
What properties are you using? This error is likely caused because you are missing the |
This code works for me with current master branch:
|
The NullPointer is probably because you haven't specified a list of characters, and you also haven't included |
That resolved the issue, thank you! |
Context
Reproduce
Details
The QuoteAttribution annotator seems to be hard-coded into the CLI and inaccessible from CoreNLP server. Can anyone confirm this is the case? That's my assessment, but I know very little Java.
Initially, QuoteAttribution couldn't find the required file path props (family words, gender, animations), but I resolved it by changing the default (outdated?) path to each. Adding props or a props file during startup didn't work. Now, I'm getting a null pointer in Sieve.java because of a null character map, which seems to be caused by a missing Person. In the case of a missing character map, "Person" should be generated. I've confirmed the person in the text being used is being identified as a person in other methods at http://corenlp.run. I'm also getting the same null pointer error at http://corenlp.run, but I can't verify it's the same issue without a stack trace.
So at this point, I'm wondering if I have an incorrect setup, QuoteAttribution isn't fully integrated, or both. I also welcome any clarification regarding the requirement for a generated BookNLP file and solutions that work dynamically with the CoreNLP server.
I would appreciate any input on the subject. I'm willing to commit any improvements or documentation that come from the discussion. Obviously I don't know Java well, but I imagine those additions would be referential in nature.
Error
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.handle(StanfordCoreNLPServer.java:770)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at edu.stanford.nlp.quoteattribution.Sieves.Sieve.createNameMatcher(Sieve.java:128)
at edu.stanford.nlp.quoteattribution.Sieves.Sieve.(Sieve.java:40)
at edu.stanford.nlp.quoteattribution.Sieves.QMSieves.QMSieve.(QMSieve.java:32)
at edu.stanford.nlp.quoteattribution.Sieves.QMSieves.TrigramSieve.(TrigramSieve.java:23)
at edu.stanford.nlp.pipeline.QuoteAttributionAnnotator.getQMMapping(QuoteAttributionAnnotator.java:220)
at edu.stanford.nlp.pipeline.QuoteAttributionAnnotator.annotate(QuoteAttributionAnnotator.java:206)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:76)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:652)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.lambda$handle$0(StanfordCoreNLPServer.java:752)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
The text was updated successfully, but these errors were encountered: