Giter Site home page Giter Site logo

Comments (3)

AngledLuffa avatar AngledLuffa commented on May 18, 2024

Are you using the latest models?

If so, what query are you using that causes it to crash?

On Sun, Dec 7, 2014 at 8:40 AM, techscrub [email protected] wrote:

I'm very excited about the new SR parser, and I'm trying to drop it into a
StanfordCoreNLP pipeline, but it's throwing an NPE when it gets to
ShiftReduceParserQuery. The same code works with the PCFG parser, and I'm
using version 3.5.0. The only properties I'm applying are:

props.put("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref");
props.put("parse.model", "edu/stanford/nlp/models/srparser/englishSR.ser.gz");
pipeline = new StanfordCoreNLP(props);

The stack trace leads to line 72 in the ShiftReduceParserQuery class:

Collection<ScoredObject> predictedTransitions = parser.model.findHighestScoringTransitions(state, true, maxBeamSize, constraints);

I confirmed that parser.model is null here, even though the output says
the model loads successfully. The relevant part of the output is below.

Adding annotator parse
Loading parser from serialized file edu/stanford/nlp/models/srparser/englishSR.ser.gz ...done [11.8 sec].
Adding annotator dcoref
java.lang.NullPointerException
at edu.stanford.nlp.parser.shiftreduce.ShiftReduceParserQuery.parseInternal(ShiftReduceParserQuery.java:72)
at edu.stanford.nlp.parser.shiftreduce.ShiftReduceParserQuery.parse(ShiftReduceParserQuery.java:47)
at edu.stanford.nlp.pipeline.ParserAnnotator.doOneSentence(ParserAnnotator.java:263)
at edu.stanford.nlp.pipeline.ParserAnnotator.doOneSentence(ParserAnnotator.java:215)
at edu.stanford.nlp.pipeline.SentenceAnnotator.annotate(SentenceAnnotator.java:95)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:68)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:408)


Reply to this email directly or view it on GitHub
#42.

from corenlp.

techscrub avatar techscrub commented on May 18, 2024

I didn't realize the SR models had changed from 3.4 to 3.5. I put in the new models and it works perfectly. I really can't thank you enough for the help, and for creating the SR parser. I have an enormous amount of text to crunch, and the performance gain from the SR parser is a game changer.

from corenlp.

manning avatar manning commented on May 18, 2024

Thanks! Great that you like it!

from corenlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.