1.0.3 • Published 8 years ago

corenlp-js-interface v1.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

corenlp-js-interface

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: https://github.com/noahDess/corenlp-js-prefab/tree/master

Installation & Test

#####Stanford CoreNLP Download and extract Stanford CoreNLP from http://stanfordnlp.github.io/CoreNLP/#download

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

#####corenlp-js-interface npm i corenlp-js-interface

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

###Usage

'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 http://stanfordnlp.github.io/CoreNLP/index.html