query-b2fa6cf79a9d0b3b9b3c52e38acad50c
(L9670) king(L1380) queen(P5137)item for this sense (L34190) Gräfin
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 skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?l1 ?lemma1 ?sense1 ?gloss1 ?l2 ?lemma2 ?sense2 ?gloss2 WHERE {
# Assuming that we have a given sense ?sense1 (here: L34190-S1),
FILTER (?sense1 = wd:L34190-S1)
# we are looking for a ?sense2 that has the same conceptualized meaning ?meaning,
?sense1 wdt:P5137 ?meaning.
?sense2 wdt:P5137 ?meaning.
# but we don’t want the ?meaning to be the gender aspect of the sense.
MINUS {
?meaning wdt:P31 wd:Q48277, wd:Q48264
}
# We also want the ?sense2 to be about a lexeme in the same language
?l1 dct:language/^dct:language ?l2.
# where ?l1 and ?l2 are the lexemes for the senses ?sense1 and ?sense2, respectively
?sense1 ^ontolex:sense ?l1.
?sense2 ^ontolex:sense ?l2.
# (Note that we would write the above three triples as the single line
?sense1 ^ontolex:sense/dct:language/^dct:language/ontolex:sense ?sense2.
# but then we wouldn’t be binding lexemes ?l1 and ?l2, which we might want for debugging.)
# And we don’t want ?sense2 to be identical to the original ?sense1
FILTER (?sense2 != ?sense1)
# Finally, for debugging purposes, we’re binding the lemmas and glosses for ?sense1 and ?sense2
?l1 wikibase:lemma ?lemma1.
?sense1 skos:definition ?gloss1.
?l2 wikibase:lemma ?lemma2.
?sense2 skos:definition ?gloss2.
}
LIMIT 1
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?gloss1"):::projected
v9("?gloss2"):::projected
v4("?l1"):::projected
v5("?l2"):::projected
v6("?lemma1"):::projected
v8("?lemma2"):::projected
v3("?meaning")
v2("?sense1"):::projected
v1("?sense2"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c4(["wd:Q48277"]):::iri
c5(["wd:Q48264"]):::iri
f0[["?sense2 != ?sense1"]]
f0 --> v1
f0 --> v2
f1[["?sense1 = 'wd:L34190-S1'"]]
f1 --> v2
v2 --"wdt:P5137"--> v3
v1 --"wdt:P5137"--> v3
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> c4
v3 --"wdt:P31"--> c5
end
v4 --"dct:language"--> a1
v5 --"dct:language"--> a1
v4 --"ontolex:sense"--> v2
v5 --"ontolex:sense"--> v1
a2 --"ontolex:sense"--> v2
a2 --"dct:language"--> a3
a4 --"dct:language"--> a3
a4 --"ontolex:sense"--> v1
v4 --"wikibase:lemma"--> v6
v2 --"skos:definition"--> v7
v5 --"wikibase:lemma"--> v8
v1 --"skos:definition"--> v9