FactGrid:Vocabulary model: Difference between revisions

From FactGrid
Jump to navigation Jump to search
(Start)
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
''this is work in progress!''
''this is work in progress!''


In short a '''controlled vocabulary''' is a set of '''concepts''' that can be connected by hierarchy (broader/narrower) and/or other generic relationships (related). Each concept has labels and should have at least one '''identifier''', unique across its vocabulary.
In short a '''controlled vocabulary''' is a set of '''concepts''' that can be connected by hierarchy (broader/narrower) and/or other generic relationships (related). Each concept has labels and should have at least one '''identifier''', unique across its vocabulary. In some vocabularies, the concepts are also grouped into '''concept types'''.


A more detailled data model of vocabularies is given by [https://gbv.github.io/jskos/ JSKOS Data Format]. FactGrid vocabulary model can be mapped to a subset of JSKOS.
A more detailled data model of vocabularies is given by [https://gbv.github.io/jskos/ JSKOS Data Format]. FactGrid vocabulary model can be mapped to a subset of JSKOS.
Line 11: Line 11:
== Vocabularies ==
== Vocabularies ==


Every vocabulary MUST have an item that is instance of {{Q|Q456374}} or one of its subclasses.
Every vocabulary MUST have an item that is instance of {{Q|Q456374}} or one of its subclasses. The following query lists all vocabularies listed in FactGrid with their corresponding property and BARTOC id:


{{Sparql|query=
{{Sparql|query=
SELECT ?item ?itemLabel ?bartoc WHERE {
SELECT ?item ?itemLabel ?property ?propertyLabel ?bartoc WHERE {
   { ?item wdt:P2/wdt:P3* wd:Q456374 }
   { ?item wdt:P2/wdt:P3* wd:Q456374 }
   OPTIONAL {
   OPTIONAL {
Line 20: Line 20:
     BIND(IRI(CONCAT("http://bartoc.org/en/node/",?id)) as ?bartoc)  
     BIND(IRI(CONCAT("http://bartoc.org/en/node/",?id)) as ?bartoc)  
   }
   }
  OPTIONAL { ?item wdt:P548 ?property }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }       
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }       
}
}
Line 26: Line 27:
== Concepts ==
== Concepts ==


Each concept is an item connect to exactely one vocabulary item.
Each concept is an item connect to exactly one vocabulary item.


''How this is done is not fixed yet.''
''How this is done is not fixed yet.''


If a vocabulary has concept types, each concept MUST be instance of ({{P|2}}) exactely one of type items.


== Identifiers ==
== Identifiers ==
Line 36: Line 38:


In some vocabularies the identifier is given by a statement (not defined yet).  
In some vocabularies the identifier is given by a statement (not defined yet).  
== Concept Types ==
If a vocabulary has concept types, there is a type item for each of this types.
''TODO: How are concept types connected to the vocabulary item? Do we need a new property "is concept type of vocabulary"?''


[[Category:Data modelling]]
[[Category:Data modelling]]
[[Category:Vocabulary]]
[[Category:Vocabulary]]

Latest revision as of 21:36, 15 April 2024

Controlled Vocabularies in FactGrid

Many relevant vocabularies exist (see FactGrid:Vocabularies), some of which are also stored or managed in FactGrid with Items. This page summarizes the corresponding data model.

this is work in progress!

In short a controlled vocabulary is a set of concepts that can be connected by hierarchy (broader/narrower) and/or other generic relationships (related). Each concept has labels and should have at least one identifier, unique across its vocabulary. In some vocabularies, the concepts are also grouped into concept types.

A more detailled data model of vocabularies is given by JSKOS Data Format. FactGrid vocabulary model can be mapped to a subset of JSKOS.

Vocabularies

Every vocabulary MUST have an item that is instance of Q456374 or one of its subclasses. The following query lists all vocabularies listed in FactGrid with their corresponding property and BARTOC id:

SELECT ?item ?itemLabel ?property ?propertyLabel ?bartoc WHERE {
  { ?item wdt:P2/wdt:P3* wd:Q456374 }
  OPTIONAL {
    ?item wdt:P932 ?id; 
    BIND(IRI(CONCAT("http://bartoc.org/en/node/",?id)) as ?bartoc) 
  }
  OPTIONAL { ?item wdt:P548 ?property }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }      
}

Try it!

Concepts

Each concept is an item connect to exactly one vocabulary item.

How this is done is not fixed yet.

If a vocabulary has concept types, each concept MUST be instance of (P2) exactely one of type items.

Identifiers

In some vocabularies the identifier is called notation and prepended to the item label, separated with ": ".

In some vocabularies the identifier is given by a statement (not defined yet).

Concept Types

If a vocabulary has concept types, there is a type item for each of this types.

TODO: How are concept types connected to the vocabulary item? Do we need a new property "is concept type of vocabulary"?