The simplest way to use Stanford CoreNLP with javascript.

Usage no npm install needed!

<script type="module">
  import corenlpJsInterface from '';



The simplest way to use Stanford CoreNLP with javascript

For prefabricated function so you only have to send text no extra parameters with each call use:

Installation & Test

Stanford CoreNLP

Download and extract Stanford CoreNLP from

Run java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer in the extracted folder to start the CoreNLP server at http://localhost:9000/.


npm i corenlp-js-interface

To test run node node_modules/corenlp-js-interface/example.js


'use strict';
const corenlp = require("corenlp-js-interface");

let text = corenlp("text to send to server",9000/*port*/,"parse,natlog,ssplit"/*annotators*/,"json"/*format*/);

You will probably want to convert the retuned string(text) to a JavaScript object if you use the json format you can do this with JSON.parse(text).

For full Stanford CoreNLP usage information see