Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get englishPCFG.ser.gz as a single file from Stanford CoreNLP

Tags:

stanford-nlp

I am far to stupid to get the stanford-parser.jar into my build path. Is there a way to obtain just the needed model file englishPCFG.ser.gz on its own, and then to LexicalizedParser.loadModel("/absolute/path/englishPCFG.ser.gz");?

like image 296
peer Avatar asked Dec 14 '22 02:12

peer


1 Answers

Yes, this is easy. A jar file is just a glorified zip file. So using either the jar command or your favorite unzipper, do something like:

unzip stanford-corenlp-3.7.0-models.jar
mv edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz .
rm -rf edu
like image 117
Christopher Manning Avatar answered Apr 08 '23 13:04

Christopher Manning