tetrak_authority.model

The authority record: one entity, its names, its keys and its identifiers.

An Entity is what a snapshot holds for one Wikidata item. Its names are every label and alias Wikidata carries in every language, plus a place’s native and official names; its keys are the fold keys of those names, which is what a lookup matches on; its identifiers are the external authority numbers Wikidata records, so a catalogue record can be linked onward to VIAF, the GND, ISNI or GeoNames.

Module Attributes

KINDS

The kinds of entity a snapshot holds.

NAME_KINDS

Where a name comes from in Wikidata.

PREFERRED_LANGUAGES

The languages whose label is preferred as the established form, in order.

Functions

established_form(names[, preferred])

The label in the first preferred language present, else any label, else any name.

key_of(text[, script])

The fold key a lookup matches on: the folded words, sorted.

Classes

Entity(id, kind, label, names, keys[, ...])

One authority record.

Name(text, language, kind[, key])

One name of an entity, as Wikidata records it.