Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ner with all npm packages installed. Try it out:

var ner = require("ner")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ner v1.0.0

Client for STANFORD NER

ner

Client for Stanford NER

Requirements

Stanford NER

Starting up Stanford NER

Use ner-server.sh

Install

$ npm install --save ner

Usage

const NER = require('ner');

const ner = new NER({
    port:8080,
    host:'172.17.0.2'
})

ner.get('Wikipedia is a free-access, free-content Internet encyclopedia, supported and hosted by the non-profit Wikimedia Foundation. Those who can access the site can edit most of its articles.[5] Wikipedia is ranked among the ten most popular websites,[4] and constitutes the Internets largest and most popular general', (err, res) => {
    console.log(res.entities);
});

API

new instance

options

port

Type: integer

Port on which NER server is running.

host

Type: string

HOST of the NER server eg. localhost .

ner.get(text, callback)

parms

text

Type: string

Text to be tagged

callback(err, response)

Type: function

Callback function which recieves the response object.

response.entities

Parsed entities from the xml server response.

response.raw

Raw xml response from server

response._parsed

Internal parser representation (regex matches)

License

MIT © Nikhil Srivastava

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free