Modelling/Index term

Revision as of 12:32, 9 May 2023 by Alicia Fagerving (WMSE) (talk | contribs) (Created page with "{{Modelling navigation}} An {{Q|Q12}} is a keyword that we use to describe e.g. the topic of a document or the focus area of a project. Within the scope of Metabase, the label is enough to tag documents; we do not concern ourselves with e.g. expressing the relationships between index terms. That's why the only the only data we provide is: * {{P|P5}} → {{Q|Q12}} * {{P|P1}} → Q ID For example: {{Q|Q18}}, {{Q|Q39}}, {{Q|Q17}}. Query to find all index terms with the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


An index term (Q12) is a keyword that we use to describe e.g. the topic of a document or the focus area of a project.

Within the scope of Metabase, the label is enough to tag documents; we do not concern ourselves with e.g. expressing the relationships between index terms. That's why the only the only data we provide is:

For example: museum collection (Q18), public art (Q39), authority control (Q17).

Query to find all index terms with their labels and descriptions in Swedish and English:

PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>

SELECT ?item ?itemLabelEN ?itemLabelSV ?wikidata_iri
WHERE
{
?item wbt:P5 wb:Q12 .
OPTIONAL {?item wbt:P1 ?wikidataQ}
OPTIONAL {?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en")}.
OPTIONAL {?item rdfs:label ?itemLabelSV filter (lang(?itemLabelSV) = "sv")}.
BIND(URI(concat("http://www.wikidata.org/entity/", ?wikidataQ)) AS ?wikidata_iri)
}

Try it!