8000 GitHub - aayn/stanford-corenlp-python at f3b15dc9284b2e81f1a836486474f6728868d8d2
[go: up one dir, main page]

Skip to content

aayn/stanford-corenlp-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python interface to Stanford Core NLP tools

This a Python wrapper for Stanford University's NLP group's Java-based CoreNLP tools. 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 and usually a few minutes loading time), most applications will probably want to run it as a server.

There's not much to this script.

It requires pexpect.

This uses jsonrpc and python-progressbar, which are included in this repository.

Download and Usage

You should have downloaded and unpacked the tgz file containing Stanford's Core-NLP package. Then copy all of the python files from this repository into the stanford-corenlp-2010-11-12 folder.

Then, to launch a server:

python server.py

Optionally, specify a host or port:

python server.py -H 0.0.0.0 -p 3456

To run a public JSON-RPC server on port 3456.

See client.py for example of how to connect with a client.

Questions

I have only tested this on Core NLP tools version 1.0.2 released 2010-11-12.

If you think there may be a problem with this wrapper, first ensure you can run the Java program:

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

About

Python wrapper for Stanford CoreNLP tools v3.4.1

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%
0