0.4.2 • Published 8 years ago

entitizer.entities-extractor v0.4.2

Weekly downloads
15
License
PRIVATE
Repository
github
Last release
8 years ago

entitizer.entities-extractor

Extract entities from a context. Entities are Named-entities, stored/learned by Entitizer.

Usage

var extractor = require('entitizer.entities-extractor');
var context = { text: 'Some long text... London.', lang: 'ro', country: 'md' };
extractor.extract(context)
  .then(data => {

  });

API

extract(context: Context, repository: Repository, formatKey: formatKeyFunc): Promise

Extracts entities from a context and a repository.

Input data:

type Context = {
  text: string
  lang: string
  country?: string
}

export interface Repository<T extends Entity> {
    entitiesByIds(ids: string[]): Promise<T[]>
    entityIdsByKeys(keys: string[]): Promise<PlainObject<string[]>>
}

interface formatKeyFunc {
    (name: string, lang: string): string
}

Output data:

type ExtractData = {

}

LICENSE

Private: Entitizer, Dumitru Cantea.

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago