Extract entities from a context. Entities are Named-entities, stored/learned by Entitizer.
var extractor = require('entitizer.entities-extractor');
var context = { text: 'Some long text... London.', lang: 'ro', country: 'md' };
extractor.extract(context)
.then(data => {
});
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 = {
}
Private: Entitizer, Dumitru Cantea.