Link

Using CoreNLP within other programming languages and packages

Table of contents


Below are interfaces and packages for running Stanford CoreNLP from other languages or within other packages. They have been written by many other people (thanks!). In general you should contact these people directly if you have problems with these packages.

C#/F#/.NET

Clojure

Docker

Okay, Docker isn’t a language, but you know what we mean….

Note on running the CoreNLP server under docker: The container’s port 9000 has to be published to the host. For example, give a command like: docker run -p 9000:9000 --name coreNLP --rm -i -t motiz88/corenlp. If, when going to localhost:9000/, you see the error This site can’t be reached. localhost refused to connect, then this is what you failed to do!

And there are many others – it’s not so hard to build a dockerfile. Here are a few more:

Elixir

  • corenlp by Robert Bates provides a thin client interface in Elixir to a CoreNLP server. GitHub.

Go (golang)

  • go-corenlp is a Golang wrapper for CoreNLP by Hironobu Saito.

Java

JavaScript (node.js)

Other choices are now probably best avoided:

  • corenlp-js-interface is the simplest interface with CoreNLP server in node.js. The GitHub site is no longer available.
  • corenlp-js-prefab a simple interface to the CoreNLP server with a prefab function so you only have to send text no extra parameters with each call. By Noah Dessauer. The GitHub site is no longer available.
  • stanford-corenlp-node (github site) is a webservice interface to CoreNLP in node.js by Mike Hewett. No recent development.
  • stanford-simple-nlp (github site) is a node.js CoreNLP wrapper by Taeho Kim (xissy). This doesn’t seem to have been updated lately. You’re better off with something else.

Lua

Perl

PHP

Python

Official StanfordNLP Package

We are actively developing a Python package called StanfordNLP. This package includes an API for starting and making requests to a Stanford CoreNLP server. It is the recommended way to use Stanford CoreNLP in Python.

  • StanfordNLP Official Stanford NLP Python package, covering 70+ languages

Packages using the Stanford CoreNLP server

These packages use the Stanford CoreNLP server that we’ve developed over the last couple of years.

Miscellaneous Python packages

These packages are miscellaneous utilities or other frameworks that use Stanford CoreNLP.

Older Python packages

These are previous generation Python interfaces to Stanford CoreNLP, using a subprocess or their own server. They are now not generally being developed and are obsolete. (But thanks a lot to the people who wrote them in the early days!)

R (CRAN)

Ruby

  • Stanford CoreNLP Ruby bindings by Louis Mullie (see also: Ruby Gems page). (Updated in Feb 2017 to CoreNLP 3.5.0.)
  • The larger TREAT NLP toolkit by Louis Mullie also makes available Stanford CoreNLP.
  • corenlp by Lengio Corp. is another interface to CoreNLP (last updated for CoreNLP 3.4).
  • stanford-core-nlp by Will Hayworth is another older interface to CoreNLP (also for CoreNLP 3.4).

Scala

Thrift server

XQuery

ZeroMQ/ØMQ servers

  • stanford-0mq by Diane Napolitano. An implementation of a server for Stanford’s CoreNLP suite using Ømq and a basic client/server/JSON requests configuration. Last commit: Oct 2015.
  • stanford-corenlp-zeromq by URXtech. Basic JSON wrapper around CoreNLP.
  • corenlp-zmq by Thom Neale. A Dockerfile and Ansible provisioning script to build and run a Stanford CoreNLP server process with a single ZMQ broker font-end that proxies incoming requests to one or more back-end Scala workers. Last commit: 2015.
  • corenlp-server by Eric Kow. Simple Java server communicating with clients via XML through ZeroMQ. Example Python client included. Last commit: 2014.