Einfache Fragen (SQ)
SQ1 Wo wurde Barack Obama geboren?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
SELECT ?placelabel WHERE {
?person gndo:preferredNameEntityForThePerson ?nameNode .
?nameNode gndo:forename "Barack" ; gndo:surname "Obama" .
?person gndo:placeOfBirth ?place .
?place gndo:preferredNameForThePlaceOrGeographicName ?placelabel .
}
|
SQ2 Welche Berufe hatte Leonardo Da Vinci?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?job WHERE {
<https://d-nb.info/gnd/118640445> gndo:professionOrOccupation ?jobnode .
?jobnode (rdf:_1|rdf:_2|rdf:_3|rdf:_4|rdf:_5|rdf:_6|rdf:_7|rdf:_8|rdf:_9|rdf:_10|rdf:_11|rdf:_12|rdf:_13) ?jobId .
?jobId gndo:preferredNameForTheSubjectHeading ?job .
}
|
SQ3.1 Hatte Umberto Eco Kinder?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX agrelon: <https://d-nb.info/standards/elementset/agrelon#>
ASK { <https://d-nb.info/gnd/11852884X> agrelon:hasChild ?o }
|
SQ3.2 Wie heißen Umberto Ecos Kinder?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
SELECT ?name WHERE {
<https://d-nb.info/gnd/11852884X> agrelon:hasChild ?child .
?child gndo:preferredNameForThePerson ?name .
}
|
SQ4 Gibt es ein Lied/Werk, dass von Lady Gaga und Ariana Grande geschrieben wurde?
Codeblock |
---|
|
ASK { ?werk gndo:firstComposer|gndo:composer <https://d-nb.info/gnd/135898838>;
gndo:firstComposer|gndo:composer <https://d-nb.info/gnd/1043090436> . }
|
SQ5 War Bud Spencer Italiener? (Hinweis: Wirklicher Name: Carlo Pedersoli)
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
ASK { ?person gndo:preferredNameEntityForThePerson|gndo:variantNameEntityForThePerson ?nameNode .
?nameNode gndo:forename "Bud" ; gndo:surname "Spencer" .
?person gndo:placeOfBirth ?placeOfBirth .
?placeOfBirth gndo:geographicAreaCode <https://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-IT> .
}
|
SQ6 Wann starb Douglas Adams?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?deathDate WHERE {
?person gndo:preferredNameEntityForThePerson ?nameNode .
?nameNode gndo:forename "Douglas" ; gndo:surname "Adams" .
?person gndo:dateOfDeath ?deathDate .
}
|
SQ7 Wann wurde "Per Anhalter durch die Galaxis" veröffentlicht?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX agrelon: <https://d-nb.info/standards/elementset/agrelon#>
SELECT ?date WHERE {
?work gndo:variantNameForTheWork|gndo:preferredNameForTheWork "Per Anhalter durch die Galaxis" ;
gndo:dateOfPublication ?date .
}
|
SQ8 Welche Werke hat Marc-Uwe Kling bisher veröffentlicht?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?worktitle WHERE {
?work gndo:firstAuthor <https://d-nb.info/gnd/13796398X> .
?work gndo:preferredNameForTheWork ?worktitle .
}
|
Falls die ID der Entität nicht bekannt ist muss nach dem String in den properties gesucht werden. Hauptsächlich gibt es preferredNames und variantNames. Das sähe dann so aus:
?person gndo:preferredNameForThePerson "Obama, Barack" . #Achtung Reihenfolge der Namen dann: Nachname, Vorname
Oder
?person gndo:preferredNameEntityForThePerson ?nameNode .
?nameNode gndo:forename "Barack" ; gndo:surname "Obama" .
Zusätzlich die varianten Namen durchsuchen mit:
?person gndo:variantNameForThePerson|gndo:preferredNameForThePerson "Ūbāmā, Bārāk" ;
Und
?person gndo:variantNameEntityForThePerson|gndo:preferredNameEntityForThePerson ?nameNode .
?nameNode gndo:forename "Barack Hussein" ; gndo:surname "Obama" .
Komplexe Fragen (CQ)
CQ1
...
In welche Sprachen wurde Johann Wolfgang von Goethe’s Faust übersetzt und wieviele Publikationen gibt es pro Sprache ?
(Die Ergebnisse wirken etwas wenig, das hat aber mit unserer Katalogisierung zu tun. Vielleicht finde ich noch eine bessere Lösung)
Codeblock |
---|
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?lang (COUNT(?lang) AS ?count)
WHERE {
?work schema:exampleOfWork <https://d-nb.info/gnd/4128140-8> ;
optional {
?work dcterms:language ?lang .
}
} group by ?lang
|
...
CQ2 Welche Publikationen von anderen Autoren gehören zur gleichen literarischen Bewegung wie Friedrich Schiller?
Codeblock |
---|
|
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dbc: <http://dbpedia.org/resource/Category:>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT DISTINCT ?otherAuthors ?otherAuthorsId ?title ?dnbitem WHERE {
SERVICE <https://dbpedia.org/sparql> {
?s rdfs:label "Friedrich Schiller"@de .
?s dbo:movement ?movement .
?other dbo:movement ?othermovement .
?other owl:sameAs ?otherAuthorsId .
?other rdfs:label ?otherAuthors FILTER (LANG(?otherAuthors)="de") .
FILTER regex(?otherAuthorsId, "^http://viaf", "i")
FILTER ((?movement = ?othermovement) && (?other != ?s))
}
?dnbitem dc:title ?title ;
dcterms:creator ?creator .
?creator owl:sameAs ?otherAuthorsId .
} |
...
CQ3 Welche Berufe sind wie oft von Personen vertreten, die mit dem Ort Frankfurt
...
in irgendeiner Weise verbunden sind?
Codeblock |
---|
|
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?job (COUNT(?job) AS ?count) (GROUP_CONCAT(DISTINCT ?jobAlternative; SEPARATOR=", ") AS ?alternatives)
WHERE {
?person ?georef gnd:4018118-2 ; # Person mit irgendeinem geografischem Bezug zu Frankfurt
gndo:professionOrOccupation ?jobnode .
?jobnode (rdf:_1|rdf:_2|rdf:_3|rdf:_4|rdf:_5|rdf:_6|rdf:_7|rdf:_8) ?jobId .
?jobId gndo:preferredNameForTheSubjectHeading ?job .
OPTIONAL { ?jobId gndo:variantNameForTheSubjectHeading ?jobAlternative . }
}
GROUP BY ?job
ORDER BY DESC(?count) |
...
CQ4 Welche Berufe gab es Nürnberg im 17. Jahrhundert?
Codeblock |
---|
|
PREFIX gnd: <https://d-nb.info/gnd/>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?job (COUNT(?job) AS ?count) (GROUP_CONCAT(DISTINCT ?jobAlternative; SEPARATOR=", ") AS ?alternatives)
WHERE {
?person ?georef gnd:4042742-0 ; # Person mit irgendeinem geografischem Bezug zu Nürnberg
gndo:professionOrOccupation ?jobnode .
?jobnode (rdf:_1|rdf:_2|rdf:_3|rdf:_4|rdf:_5|rdf:_6|rdf:_7|rdf:_8) ?jobId .
?jobId gndo:preferredNameForTheSubjectHeading ?job .
OPTIONAL { ?jobId gndo:variantNameForTheSubjectHeading ?jobAlternative . }
OPTIONAL { ?person gndo:dateOfBirth ?birthDay . }
OPTIONAL { ?person gndo:dateOfDeath ?deathDay . }
FILTER ( bound(?birthDay) || bound(?deathDay) ) .
FILTER ( bound(?birthDay) && ?birthDay >= "1501-01-01"^^xsd:date && ?birthDay < "1701-01-01"^^xsd:date ) .
FILTER ( bound(?deathDay) && ?deathDay >= "1601-01-01"^^xsd:date && ?deathDay < "1801-01-01"^^xsd:date ) .
}
GROUP BY ?job |
...
CQ5 Literaturlisten zu konkreten Themen z.B . Nenne mir drei Publikationen zur Geschichte des Bibliothekswesens in Deutschland)
keine genaue Suche mit Schlagworten möglich, da keine Formschlagwörter wie „Geschichte“ ausgeliefert werden – deshalb über Dewey Klassifikation „Klassifiziere „Klassifiziere Geschichte und Biografien bezogen auf Bibliotheken in 027.009 „ [aktuell Spezialwissen]
...
Codeblock |
---|
|
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?work ?title WHERE {
?work dc:title ?title .
?work dcterms:subject ?deweyclass .
filter( regex( str(?deweyclass), "^http://dewey.info/class/027.009" ) )
} |
...
CQ6 Mit welchen Schlagworten kann ich Literatur zum Ausbruch der Französischen Revolution finden?
(siehe Q5 -> Weg über Dewey Klassifikation)
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT distinct ?SWname (COUNT(?SWname) AS ?count) WHERE {
?work dc:title ?title .
?work dcterms:subject ?deweyclass .
filter( regex( str(?deweyclass), "^http://dewey.info/class/944.04" ) )
?work dcterms:subject ?gndSW .
?gndSW gndo:preferredNameForTheSubjectHeading ?SWname .
}
GROUP BY ?SWname
ORDER BY DESC(?count) |
...
CQ7 Welche Autoren sind bekannt dafür, dass sie „Italien“ in ihren Werken thematisieren?
Codeblock |
---|
|
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX gnd: <https://d-nb.info/gnd/>
SELECT distinct ?creator ?name WHERE {
?gnd gndo:geographicAreaCode <https://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-IT> .
?work dcterms:subject ?gnd .
?work dcterms:creator ?creator .
?creator gndo:preferredNameForThePerson ?name .
} |
...
CQ8 Welche Wissenschaftler oder Künstler waren Teil der Bewegung „Romantik“?
Codeblock |
---|
|
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dbc: <http://dbpedia.org/resource/Category:>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX gnd: <https://d-nb.info/gnd/>
SELECT DISTINCT ?gnd ?name WHERE {
SERVICE <https://dbpedia.org/sparql> {
?movement rdfs:label "Romantik"@de .
?person dbo:movement ?movement .
?person owl:sameAs ?personId .
FILTER regex(?personId, "^http://viaf", "i")
}
?gnd owl:sameAs ?personId .
?gnd gndo:professionOrOccupation ?jobnode .
?jobnode (rdf:_1|rdf:_2|rdf:_3|rdf:_4|rdf:_5|rdf:_6|rdf:_7|rdf:_8) ?job .
?gnd gndo:preferredNameForThePerson ?name .
FILTER (?job = gnd:4033423-5 || ?job = gnd:4033430-2 || ?job = gnd:4066567-7 || ?job = gnd:4136652-9)
} |
Beispielstruktur der Daten
Image Added