entitizer.models-builder
TypeScript icon, indicating that this package has built-in type declarations

0.1.12 • Public • Published

entitizer.models-builder

Entitizer models builder module.

Usage

import { getEntities } from 'wiki-entity';
import { EntityBuilder } from 'entitizer.models-builder';

const language = 'en';
// get Europe by title
getEntities({ language, titles: 'Europe' })
    .then(entities => {
        const wikiEntity = entities[0];
        // convert WikiEntity to an Entitizer Entity model
        const entity = EntityBuilder.fromWikiEntity(wikiEntity, language);
    });

Package Sidebar

Install

npm i entitizer.models-builder

Weekly Downloads

2

Version

0.1.12

License

ISC

Last publish

Collaborators

  • mitica