andrewnaeve / Public-Entity-Recognition

Public-Entity-Recognition is a library published to the NPM registry for named-entity-recognition of publicly traded companies. It extracts the most relevant mentions and returns the ticker symbol, description, and relevance score.

Home Page:https://www.npmjs.com/package/public-entity-recognition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

travis build

Public-Entity-Recognition

This package searches a string for mentions of a publicly-traded entity and brings back the best match's ticker symbol, description and relevance score. This might be useful for twitter mining, or fintech applications.

Installation

This package is distributed via npm:

npm install public-entity-recognition

Usage

This example scans a tweet by Donald Trump, finds that Toyota Motor is a match, and brings back stock info. Note that the package is case sensitive, and only the best match will be retrieved.

var entity = require('public-entity-recognition');
var scan = entity.per('Toyota Motor said will build a new plant in Baja, Mexico, to build Corolla cars for U.S. NO WAY! Build plant in U.S. or pay big border tax.');
returns { match: 'Toyota Motor', symbol: 'TM', description: 'Toyota Motor Corp Ltd Ord', relevance: 0.4 }

Remaining Work

In the future, I plan to modify the repo to return a full list of matches in order of relevance

About

Public-Entity-Recognition is a library published to the NPM registry for named-entity-recognition of publicly traded companies. It extracts the most relevant mentions and returns the ticker symbol, description, and relevance score.

https://www.npmjs.com/package/public-entity-recognition

License:Other


Languages

Language:JavaScript 100.0%