corenlp-request-wrapper

1.0.3 • Public • Published

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 Server was lunched here with the french props file on port 9000
corenlp.parse(
  "Bonjour le monde." /*stringToProcess*/,
  9000 /*portNumber*/,
  "pos,lemma" /*annotators*/,
  "json" /*outputFormat*/,
  (err, parsedText) => { /*Callback function*/
    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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i corenlp-request-wrapper

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • nash403