Comments (3)
CoreNLP should be able to read the caseless parser model. Is it possible
you are using code and models from different releases?
If you're using the latest code, it's also possible that the models file on
the website is out of date.
Regardless, it would help diagnosing the problem a lot if you said more
about how CoreNLP can't read the model. For example, if it's throwing an
exception, a copy of the exception would help.
There should not be conflicts if you use the same version for the two tools.
On Tue, Dec 23, 2014 at 11:03 PM, lkq1992yeah [email protected]
wrote:
In my project, I use Stanford CoreNLP to perform some basic operations.
Meanwhile I need use a caseless model for parsing, so I chose
"englichPCFG.caseless.ser.gz" in the model of Stanford Parser. However,
CoreNLP cannot read this model, so I added Stanford Parser into my project,
along with CoreNLP.But here comes the question: there are java files with the same path (same
package and same name) in both Stanford CoreNLP and Stanford Parser, once
there are slight differences between these two java files, things got
complicated, because I don't know which function am I going to call in my
project. Actually after I added Stanford Parser in my project, the original
lemmatize module couldn't work, error was occurred when loading the model.Is there anyone who tried to add both Stanford Parser and Stanford CoreNLP
in one project, and could you give me some advice to avoid conflicts?
Thanks. :-)—
Reply to this email directly or view it on GitHub
#43.
from corenlp.
Emm, maybe the version of Stanford Parser model is a little bit older.
Currently I used stanford-corenlp-3.4 and stanford-parser-2.0.5.
Below is the exception when I only use CoreNLP to load a caseless parsing model:
Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.caseless.ser.gz ...
java.lang.RuntimeException: java.lang.ClassNotFoundException: edu.stanford.nlp.util.LowercaseFunction
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:206)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromSerializedFile(LexicalizedParser.java:630)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:424)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:183)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:162)
at kangqi.baseline.TypeWordExtractor.initSyntParser(TypeWordExtractor.java:44)
at kangqi.baseline.TypeWordExtractor.main(TypeWordExtractor.java:181)
My CoreNLP doesn't contain edu.stanford.nlp.util.LowercaseFunction, while Stanford Parser has.
And below is the exception when I added CoreNLP and Parser together, then try to lemmatize:
Exception in thread "main" java.lang.NoSuchMethodError: edu.stanford.nlp.process.WordToSentenceProcessor.stringToNewlineIsSentenceBreak(Ljava/lang/String;)Ledu/stanford/nlp/process/WordToSentenceProcessor$NewlineIsSentenceBreak;
at edu.stanford.nlp.pipeline.WordsToSentencesAnnotator.(WordsToSentencesAnnotator.java:55)
at edu.stanford.nlp.pipeline.StanfordCoreNLP$3.create(StanfordCoreNLP.java:529)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:85)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(StanfordCoreNLP.java:267)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:129)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:125)
at kangqi.util.grammar.Lemmatizer.initPipeline(Lemmatizer.java:27)
at kangqi.util.grammar.Lemmatizer.lemmatize(Lemmatizer.java:32)
at kangqi.baseline.TypeWordExtractor.parseQuestion(TypeWordExtractor.java:71)
at kangqi.baseline.TypeWordExtractor.work(TypeWordExtractor.java:134)
at kangqi.baseline.TypeWordExtractor.main(TypeWordExtractor.java:142)
from corenlp.
Using these versions together will definitely not work.
I suggest updating to the latest version of both parser and corenlp and
using the caseless models available on the webpage. If those still don't
work, it is possible the models are out of date. If so, we will post new
ones.
On Wed, Dec 24, 2014 at 1:16 AM, lkq1992yeah [email protected]
wrote:
Emm, maybe the version of Stanford Parser model is a little bit older.
Currently I used stanford-corenlp-3.4 and stanford-parser-2.0.5.Below is the exception when I only use CoreNLP to load a caseless parsing
model:
Loading parser from serialized file
edu/stanford/nlp/models/lexparser/englishPCFG.caseless.ser.gz ...
java.lang.RuntimeException: java.lang.ClassNotFoundException:
edu.stanford.nlp.util.LowercaseFunction
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:206)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromSerializedFile(LexicalizedParser.java:630)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:424)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:183)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:162)
at
kangqi.baseline.TypeWordExtractor.initSyntParser(TypeWordExtractor.java:44)
at kangqi.baseline.TypeWordExtractor.main(TypeWordExtractor.java:181)
My CoreNLP doesn't contain edu.stanford.nlp.util.LowercaseFunction, while
Stanford Parser has.And below is the exception when I added CoreNLP and Parser together, then
try to lemmatize:
Exception in thread "main" java.lang.NoSuchMethodError:
edu.stanford.nlp.process.WordToSentenceProcessor.stringToNewlineIsSentenceBreak(Ljava/lang/String;)Ledu/stanford/nlp/process/WordToSentenceProcessor$NewlineIsSentenceBreak;
at
edu.stanford.nlp.pipeline.WordsToSentencesAnnotator.(WordsToSentencesAnnotator.java:55)
at
edu.stanford.nlp.pipeline.StanfordCoreNLP$3.create(StanfordCoreNLP.java:529)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:85)
at
edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(StanfordCoreNLP.java:267)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:129)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:125)
at kangqi.util.grammar.Lemmatizer.initPipeline(Lemmatizer.java:27)
at kangqi.util.grammar.Lemmatizer.lemmatize(Lemmatizer.java:32)
at
kangqi.baseline.TypeWordExtractor.parseQuestion(TypeWordExtractor.java:71)
at kangqi.baseline.TypeWordExtractor.work(TypeWordExtractor.java:134)
at kangqi.baseline.TypeWordExtractor.main(TypeWordExtractor.java:142)—
Reply to this email directly or view it on GitHub
#43 (comment).
from corenlp.
Related Issues (20)
- new requirement in parsers HOT 2
- TokensRegex cannot detect rules cross the period '.' HOT 10
- Online demo is down HOT 7
- Compile error, 'tree' can't be resolved...can't figure out what's going on! HOT 11
- com.apple.eawt.Application can not be resolved to a type (in class OSXAdapter) HOT 5
- Demo Website Issue HOT 2
- An exception occurred: Expecting value: line 1 column 1 (char 0) HOT 1
- IntervalTree#remove null pointer exception HOT 4
- i am getting a lock screen bug HOT 3
- Upgrade Apache Lucene to resolve vulnerability for consumers HOT 8
- negation modifier HOT 4
- Add Automatic-Module-Name to MANIFEST.MF HOT 22
- english.all.3class.distsim.crf.ser.gz ???? HOT 1
- Training Shift Reduce Parser HOT 1
- German Lemma not working? HOT 10
- Wrong POS for "keine": PRON instead of DET HOT 7
- Support HOT 2
- Is downloads.cs.stanford.edu down? HOT 3
- Arabic Processing data HOT 2
- VBN vs VBD in the input files from PTB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corenlp.