npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ner-promise

v1.0.1

Published

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

Downloads

16

Readme

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.