corenlp-request-wrapper
Make simple requests to Stanford CoreNLP with javascript.
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-request-wrapper
npm install corenlp-request-wrapper
or yarn add corenlp-request-wrapper
This wrapper provides a single method parse
which interacts with Stanford CoreNLP server.
Test & Example
To test run npm test
or yarn run test
const corenlp = require("corenlp-request-wrapper");
corenlp.parse(
"Bonjour le monde." ,
9000 ,
"pos,lemma" ,
"json" ,
(err, parsedText) => {
console.log(JSON.stringify(JSON.parse(parsedText), null, 2));
}
);
Read More
For full Stanford CoreNLP usage information see http://stanfordnlp.github.io/CoreNLP/index.html