query-d08cff068311ec7efef82d4a26db260a
Follow-up Data Ingest Operatic RolesIn June 2018, information about operatic roles was ingested from German Wikipedia. In some cases, the role designations and descriptions contain possessive pronouns that are out of context in Wikidata (e.g. "Seine Frau"; "Ihre Tochter"). Use the queries below to identify such cases and add the missing context to the description. Note that the "derivedstatements" gadget (listed in the section "Useful Links") allows to easily list all the characters of a play in a row, in the order of their ingestion. Possessive pronouns in the item's label:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?role ?roleLabel ?roleAlias ?play ?playLabel
WHERE
{
?play wdt:P31/wdt:P279* wd:Q25379.
?role wdt:P31/wdt:P279* wd:Q95074.
?role wdt:P1441 ?play.
?role rdfs:label ?role_label.
FILTER (contains(lcase(?role_label), 'sein')|| contains(lcase(?role_label), 'ihr') || contains(lcase(?role_label), 'deren') || contains(lcase(?role_label), 'dessen') ).
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?play"):::projected
v3("?role"):::projected
v1("?role_label")
a1((" "))
a2((" "))
c7(["wd:Q25379"]):::iri
c14(["de"]):::literal
c8(["wd:Q95074"]):::iri
c12(["bd:serviceParam"]):::iri
f0[["(contains(lower-case(?role_label),'sein') || (contains(lower-case(?role_label),'ihr') || (contains(lower-case(?role_label),'deren') || contains(lower-case(?role_label),'dessen'))))"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
v3 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c8
v3 --"wdt:P1441"--> v2
v3 --"rdfs:label"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end