I am new to NLP.
I am trying a sample program with LexicalizedParser
but am not able to locate the model.
String parseModel = "...../models/lexparser/englishPCFG.ser.gz";
LexicalizedParser lecicalizedParser = LexicalizedParser.loadModel(parseModel);
I have the required stanford-core-nlp-3.5.2.jar
and the ner jar too in build path of a sample Java application.
I tried referring the absolute path of the core jar and load it but could not. :(
How can I refer to the exact location of this model from my program code?
A big thank you for any help and all help!
If you use maven, make sure you include both of these dependencies in you
pom.xml
This model
englishPCFG.ser.gz
is inside package
edu.stanford.nlp.models.lexparser
that is inside
stanford-corenlp-3.5.2-models.jar
So you should use this path: