Main Page: Difference between revisions

From KBTestWikibase
Jump to navigation Jump to search
Line 54: Line 54:


=== Wat zit er in de Wikibase? ===
=== Wat zit er in de Wikibase? ===
* [https://kbtestwikibase.wikibase.cloud/query/#%23%20All%20Ps%20and%20Qs%20in%20this%20Wikibase%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0A%0ASELECT%20%20%3Fstatement%20%3FstatementLabel%20%3FstatementDescription%20%3FstatementAltLabel%0AWHERE%20%0A%7B%0A%20%20%20%3Fstatement%20wikibase%3Astatements%20%3Fb%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22nl%22.%20%7D%0A%7D%0AORDER%20BY%20%3Fstatement Alle Ps en Qs samen]
*[https://kbtestwikibase.wikibase.cloud/query/#%23%20Find%20claim%20ids%20%28GUID%29%20for%20Qnumbers%20in%20this%20Wikibase%0A%23%20https%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fw%2Fapi.php%3Faction%3Dhelp%26modules%3Dwbgetclaims%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20p%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fprop%2F%3E%0APREFIX%20ps%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fprop%2Fstatement%2F%3E%0A%0ASELECT%20%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3Fclaim%20%3FIsEenLabel%0AWHERE%20%0A%7B%0A%20%20%20%20%3Fitem%20wikibase%3Aidentifiers%20%3Fb.%0A%20%20%20%20%3Fitem%20p%3AP3%20%3Fclaim.%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%3Fclaim%20ps%3AP3%20%3FIsEen.%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22nl%22.%20%7D%0A%7D%0AORDER%20BY%20ASC%28xsd%3Ainteger%28STRAFTER%28STR%28%3Fitem%29%2C%20%27Q%27%29%29%29%0ALIMIT%2035 Claim ids (GUID) for Qnumbers in this Wikibase]
* [https://kbtestwikibase.wikibase.cloud/query/#%23%20Overview%20of%20properties%20in%20this%20Wikibase%2C%20%0A%23%20with%20their%20Labels%2C%20Descriptions%20and%20Aliases%2C%20%0A%23%20both%20in%20NL%20and%20in%20EN%2C%20%0A%23%20as%20well%20their%20equivalent%20properties%20in%20Wikidata%20%28if%20applicable%29%20%0A%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fp%20%3FpType%20%0A%3FpLabelNL%20%3FpLabelEN%20%0A%3FpDescriptionNL%20%3FpDescriptionEN%20%0A%28GROUP_CONCAT%28DISTINCT%20%3FpAliasNL%20%3B%20separator%20%3D%20%22%20%7C%20%22%29%20as%20%3FpAliasesNL%20%29%0A%28GROUP_CONCAT%28DISTINCT%20%3FpAliasEN%20%3B%20separator%20%3D%20%22%20%7C%20%22%29%20as%20%3FpAliasesEN%20%29%0A%3FwikidataEquivalentProperty%0A%0AWHERE%20%7B%0A%0A%20%20%3Fp%20wikibase%3ApropertyType%20%3FpType%20.%0A%20%20OPTIONAL%7B%3Fp%20wdt%3AP1%20%3FwikidataEquivalentProperty.%7D%20%0A%0A%20%20OPTIONAL%7B%3Fp%20rdfs%3Alabel%20%3FpLabelNL%20FILTER%28LANG%28%3FpLabelNL%29%3D%27nl%27%29.%7D%0A%20%20OPTIONAL%7B%3Fp%20rdfs%3Alabel%20%3FpLabelEN%20FILTER%28LANG%28%3FpLabelEN%29%3D%27en%27%29.%7D%0A%20%20%0A%20%20OPTIONAL%7B%3Fp%20schema%3Adescription%20%3FpDescriptionNL%20FILTER%28LANG%28%3FpDescriptionNL%29%20%3D%20%22nl%22%29.%20%7D%20%20%0A%20%20OPTIONAL%7B%3Fp%20schema%3Adescription%20%3FpDescriptionEN%20FILTER%28LANG%28%3FpDescriptionEN%29%20%3D%20%22en%22%29.%20%7D%0A%20%20%0A%20%20OPTIONAL%7B%3Fp%20skos%3AaltLabel%20%3FpAliasNL%20FILTER%28LANG%28%3FpAliasNL%29%20%3D%20%22nl%22%29.%20%7D%20%20%0A%20%20OPTIONAL%7B%3Fp%20skos%3AaltLabel%20%3FpAliasEN%20FILTER%28LANG%28%3FpAliasEN%29%20%3D%20%22en%22%29.%20%7D%20%20%20%20%20%0A%20%20%20%20%0A%7D%0AGROUP%20BY%20%3Fp%20%3FpType%20%3FpLabelNL%20%3FpLabelEN%20%3FpDescriptionNL%20%3FpDescriptionEN%20%3FwikidataEquivalentProperty%0AORDER%20BY%20ASC%28xsd%3Ainteger%28STRAFTER%28STR%28%3Fp%29%2C%20%27P%27%29%29%29 Overview of properties in this Wikibase, with their Labels, Descriptions and Aliases, both in NL and in EN, as well their equivalent properties in Wikidata (if applicable)]
<sparql tryit="1">
# Overview of properties in this Wikibase,
# with their Labels, Descriptions and Aliases,
# both in NL and in EN,
# as well their equivalent properties in Wikidata (if applicable)
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
SELECT ?p ?pType
?pLabelNL ?pLabelEN
?pDescriptionNL ?pDescriptionEN
(GROUP_CONCAT(DISTINCT ?pAliasNL ; separator = " | ") as ?pAliasesNL )
(GROUP_CONCAT(DISTINCT ?pAliasEN ; separator = " | ") as ?pAliasesEN )
?wikidataEquivalentProperty
WHERE {
  ?p wikibase:propertyType ?pType .
  OPTIONAL{?p wdt:P1 ?wikidataEquivalentProperty.}
  OPTIONAL{?p rdfs:label ?pLabelNL FILTER(LANG(?pLabelNL)='nl').}
  OPTIONAL{?p rdfs:label ?pLabelEN FILTER(LANG(?pLabelEN)='en').}
 
  OPTIONAL{?p schema:description ?pDescriptionNL FILTER(LANG(?pDescriptionNL) = "nl"). } 
  OPTIONAL{?p schema:description ?pDescriptionEN FILTER(LANG(?pDescriptionEN) = "en"). }
 
  OPTIONAL{?p skos:altLabel ?pAliasNL FILTER(LANG(?pAliasNL) = "nl"). } 
  OPTIONAL{?p skos:altLabel ?pAliasEN FILTER(LANG(?pAliasEN) = "en"). }   
   
}
GROUP BY ?p ?pType ?pLabelNL ?pLabelEN ?pDescriptionNL ?pDescriptionEN ?wikidataEquivalentProperty
ORDER BY ASC(xsd:integer(STRAFTER(STR(?p), 'P')))
</sparql>
* [https://kbtestwikibase.wikibase.cloud/query/#%23%20Overview%20of%20properties%20in%20this%20Wikibase%2C%20%0A%23%20with%20their%20Labels%2C%20Descriptions%20and%20Aliases%2C%20%0A%23%20both%20in%20NL%20and%20in%20EN%2C%20%0A%23%20as%20well%20their%20equivalent%20properties%20in%20Wikidata%20%28if%20applicable%29%20%0A%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20%3Fp%20%3FpType%20%0A%3FpLabelNL%20%3FpLabelEN%20%0A%3FpDescriptionNL%20%3FpDescriptionEN%20%0A%28GROUP_CONCAT%28DISTINCT%20%3FpAliasNL%20%3B%20separator%20%3D%20%22%20%7C%20%22%29%20as%20%3FpAliasesNL%20%29%0A%28GROUP_CONCAT%28DISTINCT%20%3FpAliasEN%20%3B%20separator%20%3D%20%22%20%7C%20%22%29%20as%20%3FpAliasesEN%20%29%0A%3FwikidataEquivalentProperty%0A%0AWHERE%20%7B%0A%0A%20%20%3Fp%20wikibase%3ApropertyType%20%3FpType%20.%0A%20%20OPTIONAL%7B%3Fp%20wdt%3AP1%20%3FwikidataEquivalentProperty.%7D%20%0A%0A%20%20OPTIONAL%7B%3Fp%20rdfs%3Alabel%20%3FpLabelNL%20FILTER%28LANG%28%3FpLabelNL%29%3D%27nl%27%29.%7D%0A%20%20OPTIONAL%7B%3Fp%20rdfs%3Alabel%20%3FpLabelEN%20FILTER%28LANG%28%3FpLabelEN%29%3D%27en%27%29.%7D%0A%20%20%0A%20%20OPTIONAL%7B%3Fp%20schema%3Adescription%20%3FpDescriptionNL%20FILTER%28LANG%28%3FpDescriptionNL%29%20%3D%20%22nl%22%29.%20%7D%20%20%0A%20%20OPTIONAL%7B%3Fp%20schema%3Adescription%20%3FpDescriptionEN%20FILTER%28LANG%28%3FpDescriptionEN%29%20%3D%20%22en%22%29.%20%7D%0A%20%20%0A%20%20OPTIONAL%7B%3Fp%20skos%3AaltLabel%20%3FpAliasNL%20FILTER%28LANG%28%3FpAliasNL%29%20%3D%20%22nl%22%29.%20%7D%20%20%0A%20%20OPTIONAL%7B%3Fp%20skos%3AaltLabel%20%3FpAliasEN%20FILTER%28LANG%28%3FpAliasEN%29%20%3D%20%22en%22%29.%20%7D%20%20%20%20%20%0A%20%20%20%20%0A%7D%0AGROUP%20BY%20%3Fp%20%3FpType%20%3FpLabelNL%20%3FpLabelEN%20%3FpDescriptionNL%20%3FpDescriptionEN%20%3FwikidataEquivalentProperty%0AORDER%20BY%20ASC%28xsd%3Ainteger%28STRAFTER%28STR%28%3Fp%29%2C%20%27P%27%29%29%29 Overview of items (Qs) in this Wikibase, with their Labels, Descriptions and Aliases, both in NL and in EN, as well their equivalent Q-items en URIs in Wikidata (if applicable)]
<sparql tryit="1">
# Overview of items (Qs) in this Wikibase,
# with their Labels, Descriptions and Aliases,
# both in NL and in EN,
# as well their equivalent Q-items en URIs in Wikidata (if applicable)
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabelNL ?itemLabelEN
?itemDescriptionNL ?itemDescriptionEN
(GROUP_CONCAT(DISTINCT ?itemAliasNL ; separator = "|") as ?itemAliasesNL )
(GROUP_CONCAT(DISTINCT ?itemAliasEN ; separator = "|") as ?itemAliasesEN )
?wikidataEquivalentURI ?wikidataEquivalentItem
WHERE
{
  ?item wikibase:identifiers ?b
  OPTIONAL{?item wdt:P1 ?wikidataEquivalentURI.}
  OPTIONAL{?item wdt:P4 ?wikidataEquivalentItem.}
  OPTIONAL{?item rdfs:label ?itemLabelNL FILTER(LANG(?itemLabelNL)='nl').}
  OPTIONAL{?item rdfs:label ?itemLabelEN FILTER(LANG(?itemLabelEN)='en').}
 
  OPTIONAL{?item schema:description ?itemDescriptionNL FILTER(LANG(?itemDescriptionNL) = "nl"). } 
  OPTIONAL{?item schema:description ?itemDescriptionEN FILTER(LANG(?itemDescriptionEN) = "en"). }
 
  OPTIONAL{?item skos:altLabel ?itemAliasNL FILTER(LANG(?itemAliasNL) = "nl"). } 
  OPTIONAL{?item skos:altLabel ?itemAliasEN FILTER(LANG(?itemAliasEN) = "en"). }   
   
}
GROUP BY ?item ?itemLabelNL ?itemLabelEN ?itemDescriptionNL ?itemDescriptionEN ?wikidataEquivalentURI ?wikidataEquivalentItem 
ORDER BY ASC(xsd:integer(STRAFTER(STR(?item), 'Q')))
</sparql>
* [https://kbtestwikibase.wikibase.cloud/query/#%23kbwb%20%3D%20KB%20Wikibase%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fkbtestwikibase.wikibase.cloud%2Fprop%2Fdirect%2F%3E%0APREFIX%20wikibase%3A%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23%3E%0A%0ASELECT%20%3Fding%20%3FdingLabel%20%3FdingDescription%20%20%3FIsEen%20%3FIsEenLabel%20%3FIsEenDescription%20WHERE%0A%7B%0A%3Fding%20wdt%3AP3%20%3FIsEen%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22nl%22.%20%7D%0A%7D Dingen die een instantie (P3) zijn van andere dingen]
<sparql tryit="1">
#kbwb = KB Wikibase
PREFIX wd: <https://kbtestwikibase.wikibase.cloud/entity/>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
SELECT ?ding ?dingLabel ?dingDescription  ?IsEen ?IsEenLabel ?IsEenDescription WHERE
{
?ding wdt:P3 ?IsEen
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl". }
}
</sparql>


=== Zie ook ===
=== Zie ook ===

Revision as of 14:27, 30 June 2022

Test Wikibase instance for the national library of The Netherlands.

Quick links

Eigenschappen (properties) (namespace = 122)

Items (namespace = 120)

Terminologie

  • Statements can also be expanded upon, annotated, or contextualized with the addition of optional qualifiers, references, and ranks.
  • The core part of a statement without references and ranks is also called claim. A claim without qualifiers is also referred to as snak. (= simplest P-Q pair)

Voorbeeld-items

om (het API-matig schrijven van) onze KB-datamodellen te testen en te verbeteren. Het zijn 1e, naieve schetsen, "praatstukken" om bij de datamodellering te helpen.

Centsprenten

Voer voor discussie:
Let op: Q20 beschrijft de fysieke centsprent , zie nbc.bibliotheek.nl/32226085X en KB-catalogus/32226085X.
Er is ook een PPN voor de gedigitaliseerde centsprent, zie nbc.bibliotheek.nl/380352362 en KB-catalogus/380352362, maar dat is een ander, digitaal object, een digitaal bestand, een jpg.
De conceptuele vraag die we i.h.k.v. EMMA moeten beantwoorden is hoe de fysieke en gedigitaliseerde objecten zich tot elkaar moeten verhouden, dus hoe we die relatie in onze Wikibase willen gaan vastleggen. Het aanmaken van 2 aparte Qitems , 1 voor de fysieke prent (PPN=32226085X), en 1 voor het jpg-bestand (PPN=380352362) - dus zoals het op dit moment ook in de GGC en KB-catalogus gebeurt, is mi (=Olaf) niet wenselijk, maar daar moeten we (mn. Danielle en ik) met de KB-metadata-experts een keer voor gaan zitten.
De GGC/KB-catalogus is hierin ook niet zuiver. Als je bv naar de beschrijving van het digitale ding ("de jpg") kijkt op https://webggc.oclc.org/cbs/DB=2.37/XMLPRS=Y/PPN?PPN=380352362, dan staan daar nog allerlei velden in die met het fysieke ding te maken hebben. Bv bij "Jaar van vervaardiging" - het jaar waarin de jpg gemaakt is - zou ik "2009" ipv "[tussen 1869 en 1886]" verwachten, want in de 19e eeuw kon men nog helemaal geen jpgs maken. Bij de beschrijving van het digitale bestand zou ik properties als resolutie, kleurdiepte, bestandsformaat (jpg, png, tiff..), EXIF-info, URL etc. verwachten.

Personen

Basale Qitems die mensen van vlees en bloed beschrijven

Openstaande issues (Phabricator):

Openstaand vragen:

  • Welke datamodel zit er achter de personen die we in onze Wikibase gaan beschrijven? Moeten/kunnen we aansluiten bij (hergebruik maken van) reeds bestaande datamodellen over personen en persoonsnamen?

SPARQL

Setup

PREFIX wd: <https://kbtestwikibase.wikibase.cloud/entity/>
PREFIX wds: <https://kbtestwikibase.wikibase.cloud/entity/statement/>
PREFIX wdv: <https://kbtestwikibase.wikibase.cloud/value/>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <https://kbtestwikibase.wikibase.cloud/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

Wat zit er in de Wikibase?

Zie ook

Interactie via de API

Endpoint / base URL

Via URLs

Via Python

Nog verder bekijken, waarschijnlijk relevant

Snelheid van bulk data-importeren

  • Fast Bulk Import Into Wikibase - Importing a large amount of Items into Wikibase can be a challenge. This post provides a high level overview of different importing approaches and their performance.

Wikibase.cloud project updates