Sshanu / Relation-Classification-using-Bidirectional-LSTM-Tree

TensorFlow Implementation of the paper "End-to-End Relation Extraction using LSTMs on Sequences and Tree Structures" and "Classifying Relations via Long Short Term Memory Networks along Shortest Dependency Paths" for classifying relations
MIT License
185 stars 41 forks source link

stanford_parser.jar #2

Closed Eddie1224 closed 7 years ago

Eddie1224 commented 7 years ago

hello. I have a question that which type of the stanford_parser ? java or python ? shall I download the full parser.zip and unzip it , then use the .jar and ..model.jar inside directory?

Sshanu commented 7 years ago

I have used NLTK in python. Go through this link, this helps to using NLTK in python. https://stackoverflow.com/questions/13883277/stanford-parser-and-nltk/34112695

  1. Download and install NLTK v3, same as above.

  2. Download the latest version from (current version filename is stanford-parser-full-2015-01-29.zip): http://nlp.stanford.edu/software/lex-parser.shtml#Download

  3. Extract the standford-parser-full-20xx-xx-xx.zip.

  4. Create a new folder ('jars' in my example). Place the extracted files into this jar folder: stanford-parser-3.x.x-models.jar and stanford-parser.jar.

  5. As shown above you can use the environment variables (STANFORD_PARSER & STANFORD_MODELS) to point to this 'jars' folder. I'm using Linux, so if you use Windows please use something like: C://folder//jars.

  6. Open the stanford-parser-3.x.x-models.jar using an Archive manager (7zip).

  7. Browse inside the jar file; edu/stanford/nlp/models/lexparser. Again, extract the file called 'englishPCFG.ser.gz'. Remember the location where you extract this ser.gz file.

  8. When creating a StanfordParser instance, you can provide the model path as parameter. This is the complete path to the model, in our case /location/of/englishPCFG.ser.gz.