A nodejs entity finder. entity-finder that searchs the wikipedia for titles and returns the most correct answers.
It will omit any wikipedia disambiguization pages.
import { find } from 'entity-finder';
const name = 'democratic party thailand';
const lang = 'en';
const titles = await findTitles(name, lang, { limit: 1, tags: 'thailand' });
const title = titles[0]:
// title =
// {
// title: 'Democrat Party (Thailand)',
// simple: 'Democrat Party',
// special: 'Thailand',
// description: 'The Democrat Party (Thai: พรรคประชาธิปัตย์; RTGS: prachathipat) is a Thai political party...',
// }Finds entities. Returns an array of entities ordered by relevance.
- name (String), required - Entity name:
Italy. Maybe any text:David the sculpture. - lang (String), required - Language 2 chars code:
en. - options (Object), optional - Options object:
- limit (Number) - Maxim number of entities to return. Default: 2.
export type PageTitle = {
title: string
simple?: string
special?: string
description?: string
about?: string
categories?: string[]
}- expose only
findfunction
- remove
wiki-entitydependency. - remove
requestdependency. - sixes
- New option:
orderByTagsLimit- Limits titles ordered by tags.
- search only for titles
- updated API
- filters dezambiguization titles (Category:Dezambiguization)
- updated
optionsparam
- using module wiki-entity
- new results: returns an array of WikiEntity
- updated
optionsparam
- TypeScript code
- changed entity type:
grouptoorg
- node4;
- new wikipedia parser: n3 - better performance;
- added option:
tags; - news model fields:
typesandprops;