https://github.com/nash403/corenlp-request-wrapper
Make simple requests to Stanford CoreNLP with javascript.
https://github.com/nash403/corenlp-request-wrapper
corenlp javascript stanford-corenlp wrapper
Last synced: 6 months ago
JSON representation
Make simple requests to Stanford CoreNLP with javascript.
- Host: GitHub
- URL: https://github.com/nash403/corenlp-request-wrapper
- Owner: nash403
- License: mit
- Created: 2017-05-05T09:55:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T09:14:44.000Z (over 8 years ago)
- Last Synced: 2025-03-05T19:08:19.899Z (7 months ago)
- Topics: corenlp, javascript, stanford-corenlp, wrapper
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# corenlp-request-wrapper
Make simple requests to Stanford CoreNLP with javascript.
## Stanford CoreNLP
Download and extract Stanford CoreNLP from http://stanfordnlp.github.io/CoreNLP/#downloadRun `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`
```js
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