Search code examples
javapythonubuntustanford-nlplinguistics

How to install correctly Stanford Parser in Ubuntu? (without nltk)


I'm trying to install Stanford Parser on Ubuntu 18.04.3, purely without installing the NLTK package, but I am not sure how it's installed to be able to use it with Java or Python.

I have already downloaded the complete package and the languages I need from the official website [Stanford Parser] [https://nlp.stanford.edu/software/lex-parser.shtml#Download ]. So, I also have Java JDK and Java JRE installed, but I can't get Stanford Parser paks detected.

I'm new at this. :-|


Solution

    1. Download and unzip the directory
    2. cd /path/to/stanford-parser-full-2018-10-17
    3. export CLASSPATH=/path/to/stanford-parser-full-2018-10-17/*:
    4. java -Xmx5g edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz data/english-onesent.txt