query-a3527482051d579b07ab856e88a7fd72
metamorforme42
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 ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?item ?itemLabel
(GROUP_CONCAT(SUBSTR(STR(?lexeme), 32); separator="; ") AS ?lexemes)
(GROUP_CONCAT(SUBSTR(STR(?sense), 32); separator="; ") AS ?senses)
(GROUP_CONCAT(?lemma; separator="; ") AS ?lemmas)
{
?sense wdt:P9488 wd:Q394 .
?lexeme ontolex:sense ?sense .
OPTIONAL { ?sense wdt:P5137 ?item }
?lexeme wikibase:lemma ?lemma .
FILTER (LANG(?lemma) = "fr")
SERVICE wikibase:label{bd:serviceParam wikibase:language "fr" }
}
GROUP BY ?item ?itemLabel
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?item"):::projected
v1("?itemLabel"):::projected
v2("?lemma"):::projected
v8("?lemmas")
v4("?lexeme"):::projected
v6("?lexemes")
v3("?sense"):::projected
v7("?senses")
c8(["bd:serviceParam"]):::iri
c3(["wd:Q394"]):::iri
c1(["fr"]):::literal
f0[["?lemma = 'fr'"]]
f0 --> v2
v3 --"wdt:P9488"--> c3
v4 --"ontolex:sense"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P5137".-> v5
end
v4 --"wikibase:lemma"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c1
end
bind4[/"substring(str(?lexeme),'32^^xsd:integer')"/]
v4 --o bind4
bind4 --as--o v6
bind5[/"substring(str(?sense),'32^^xsd:integer')"/]
v3 --o bind5
bind5 --as--o v7
bind6[/"?lemma"/]
v2 --o bind6
bind6 --as--o v8