Skip to content

Dialogs for the CWRC-Writer that lookup people, places, organizations, and publications in public authority files.

License

Notifications You must be signed in to change notification settings

cwrc/CWRC-PublicEntityDialogs

Repository files navigation

CWRC-PublicEntityDialogs

Picture

Travis Codecov version downloads GPL-2.0 semantic-release Commitizen friendly experimental

  1. Overview
  2. Installation
  3. Use
  4. API
  5. Development

Overview

The CWRC-PublicEntityDialogs are used with the CWRC-WriterBase to lookup entities (people, places, organizations, and titles) in various public name authority files (e.g. VIAF) or databases (e.g. Wikidata). The dialogs only provide public lookup. Creation/editing/deletion of entities should be made outside of the CWRC-Writer in the name authority itself.

The currently available entity lookup sources are:

Installation

npm install cwrc-public-entity-dialogs

Use

The dialogs must be configured with entity lookup sources, using the registerEntitySources method. They are then passed to the CWRC-WriterBase.

const EntityLookupDialogs = require("cwrc-public-entity-dialogs");

const viaf = require("viaf-entity-lookup");
const dbpedia = require("dbpedia-entity-lookup");

EntityLookupDialogs.registerEntitySources({
  person: new Map().set("viaf", viaf).set("dbpedia", dbpedia),
  place: new Map().set("viaf", viaf).set("dbpedia", dbpedia),
  organization: new Map().set("viaf", viaf).set("dbpedia", dbpedia),
  title: new Map().set("viaf", viaf).set("dbpedia", dbpedia)
});

const CWRCWriter = require("cwrc-writer-base");
const writer = new CWRCWriter({
  entityLookupDialogs: EntityLookupDialogs
});

API

View the full API here

Development

CWRC-Writer-Dev-Docs explains how to work with CWRC-Writer GitHub repositories, including this one.

About

Dialogs for the CWRC-Writer that lookup people, places, organizations, and publications in public authority files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •