8000 changed jars to work with v1.2.0. needs testing · ez-max/stanford-corenlp-python@29ee872 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29ee872

Browse files
committed
changed jars to work with v1.2.0. needs testing
1 parent d998838 commit 29ee872

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Python interface to Stanford Core NLP tools
1+
# Python interface to Stanford Core NLP tools v1.2.0
22

33
This a Python wrapper for Stanford University's NLP group's Java-based [CoreNLP tools](http://nlp.stanford.edu/software/corenlp.shtml). It can either be imported as a module or run as an JSON-RPC server. Because it uses many large trained models (requiring 3GB RAM on 64-bit machines and usually a few minutes loading time), most applications will probably want to run it as a server.
44

@@ -8,18 +8,18 @@ There's not much to this script. I decided to create it after having problems u
88
First the JPypes approach used in [stanford-parser-python](http://projects.csail.mit.edu/spatial/Stanford_Parser) had trouble initializing a JVM on two separate computers. Next, I discovered I could not use a
99
[Jython solution](http://blog.gnucom.cc/2010/using-the-stanford-parser-with-jython/) because the Python modules I needed did not work in Jython.
1010

11-
It runs the Stanford CoreNLP jar in a separate process, communicates with the java process using its command-line interface, and makes assumptions about the output of the parser in order to parse it into a Python dict object and transfer it using JSON. The parser will break if the output changes significantly. I have only tested this on **Core NLP tools version 1.0.2** released 2010-11-12.
11+
It runs the Stanford CoreNLP jar in a separate process, communicates with the java process using its command-line interface, and makes assumptions about the output of the parser in order to parse it into a Python dict object and transfer it using JSON. The parser will break if the output changes significantly. I have only tested this on **Core NLP tools version 1.2.0** released 2011-09-16.
1212

1313
## Download and Usage
1414

15-
You should have [downloaded](http://nlp.stanford.edu/software/corenlp.shtml#Download) and unpacked the tgz file containing Stanford's CoreNLP package. Then copy all of the python files from this repository into the `stanford-corenlp-2010-11-12` folder.
15+
You should have [downloaded](http://nlp.stanford.edu/software/corenlp.shtml#Download) and unpacked the tgz file containing Stanford's CoreNLP package. Then copy all of the python files from this repository into the `stanford-corenlp-2011-09-16` folder.
1616

1717
In other words:
1818

1919
sudo pip install pexpect
20-
wget http://nlp.stanford.edu/software/stanford-corenlp-v1.0.2.tgz
21-
tar xvfz stanford-corenlp-v1.0.2.tgz
22-
cd stanford-corenlp-2010-11-12
20+
wget http://nlp.stanford.edu/software/stanford-corenlp-v1.2.0.tgz
21+
tar xvfz stanford-corenlp-v1.2.0.tgz
22+
cd stanford-corenlp-2011-09-16
2323
git clone git://github.com/dasmith/stanford-corenlp-python.git
2424
mv stanford-corenlp-python/* .
2525

@@ -85,7 +85,7 @@ tar xvfz WNprolog-3.0.tar.gz
8585
**Stanford CoreNLP tools require a large amount of free memory**. Java 5+ uses about 50% more RAM on 64-bit machines than 32-bit machines. 32-bit machine users can lower the memory requirements by changing `-Xmx3g` to `-Xmx2g` or even less.
8686
If pexpect timesout while loading models, check to make sure you have enough memory and can run the server alone without your kernel killing the java process:
8787

88-
java -cp stanford-corenlp-2010-11-12.jar:stanford-corenlp-models-2010-11-06.jar:xom-1.2.6.jar:xom.jar:jgraph.jar:jgrapht.jar -Xmx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -props default.properties
88+
java -cp stanford-corenlp-2011-09-16.jar:stanford-corenlp-2011-09-14-models.jar:xom.jar:joda-time.jar -Xmx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -props default.properties
8989

9090
You can reach me, Dustin Smith, by sending a message on GitHub or through email (contact information is available [on my webpage](http://web.media.mit.edu/~dustin)).
9191

corenlp.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ def __init__(self):
115115
Spawns the server as a process.
116116
"""
117117

118-
jars = ["stanford-corenlp-2010-11-12.jar",
119-
"stanford-corenlp-models-2010-11-06.jar",
120-
"jgraph.jar",
121-
"jgrapht.jar",
118+
jars = ["stanford-corenlp-2011-09-16.jar",
119+
"stanford-corenlp-2011-09-14-models.jar",
120+
"joda-time.jar",
122121
"xom.jar"]
123122

124123
# if CoreNLP libraries are in a different directory,

0 commit comments

Comments
 (0)
0