Giter Club home page Giter Club logo

ner-promise's Introduction

ner-promise

A node.js wrapper for Stanford Named Entity Recognition, using promises.

ner-promises takes text as input and uses Stanford's NER (Java-based) to tag named entities in the text.

This is an adaption of https://github.com/26medias/node-ner using promises. Another important distinction is that this package takes its input from a variable, rather than needing to read a file.

Installation:

You will need to download Stanford NER:

https://nlp.stanford.edu/software/stanford-ner-2018-10-16.zip

Please ensure you have the Java Runtime Environment installed and Java in your PATH.

You can test the above by running:

java -mx1500m -cp stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier classifiers\english.all.3class.distsim.crf.ser.gz -textFile path-to-a-text-file.txt

NPM Package Installation:

npm install ner-promise

Example usage:

const ner = require('ner-promise');

const nerPromise = new ner({
	install_path: '/path/to/stanford-ner'  
});

const text = `Bob Moog (1934-2005) was an innovator in the world of electronic music for more than 50 years, expanding the boundaries of sonic expression and affecting the lives of musicians and music lovers around the globe. His invention of the Moog synthesizer in 1964 (in collaboration with Herb Deutsch) revolutionized almost every genre of music, offering performers new sonic possibilities in which to express their creativity. For many musicians, the synthesizer transformed their lives and work.  Bob's impact and the legacy are ongoing.`;

async function test(text){
    const entities = await nerPromise.process(text);
    console.log(entities);
}

test(text);

Have fun.

ner-promise's People

Contributors

tahmas avatar

Watchers

 avatar

Forkers

laudebugs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.