Lightweight Nodejs Stanford NER package
npm install @enmaso/node-ner
/stanford-ner-2017-06-09
| /classifiers
| /lib
| build.xml
| stanford-ner.jar
| ...
| server.sh
`
Run the server
`
sudo ./server.sh 8080
`
If you change the TCP port from 8080, you need to make sure you define the port in your project method. The parse method defaults to port 8080.Installation
`
npm install --save @enmaso/node-ner
`Usage
`javascript
const ner = require('@enmaso/node-ner')let file = 'path/to/file.extension'
ner.parse(file, (tags) => {
console.log(tags)
})
`
Returns JSON object.
If you use a port other than 8080 for the NERServer, you will need to pass the port in with your parse method
`javascript
ner.parse(file, 8080, (tags) => {
console.log(tags)
})
`Kill Stanford NERServer
`
$ ps -A |grep java
$ kill -9 PID
``