query-7d6cf87a84d56cb7ace216203929f279
Lexemes
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 dct: <http://purl.org/dc/terms/>
select
?unit
(sample(?lexeme) as ?lexeme)
(group_concat(distinct ?sl; separator = ", ") as ?singular)
(group_concat(distinct ?pl; separator = ", ") as ?plural)
where {
?unit wdt:P31 / wdt:P279* wd:Q47574 .
?lexeme ontolex:sense / wdt:P5137 ?unit ;
dct:language wd:Q1860 .
optional {
?lexeme ontolex:lexicalForm [ wikibase:grammaticalFeature wd:Q110786 ; ontolex:representation ?s ] .
bind (concat(str(?s), " (", lang(?s), ")") as ?sl)
}
optional {
?lexeme ontolex:lexicalForm [ wikibase:grammaticalFeature wd:Q146786 ; ontolex:representation ?p ] .
bind (concat(str(?p), " (", lang(?p), ")") as ?pl)
}
} group by ?unit
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?lexeme"):::projected
v5("?p")
v6("?pl"):::projected
v8("?plural")
v3("?s")
v7("?singular")
v4("?sl"):::projected
v1("?unit"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c3(["wd:Q47574"]):::iri
c9(["wd:Q110786"]):::iri
c12(["wd:Q146786"]):::iri
c7(["wd:Q1860"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v7 --"ontolex:sense"--> a2
a2 --"wdt:P5137"--> v1
v7 --"dct:language"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a3 -."wikibase:grammaticalFeature".-> c9
a3 --"ontolex:representation"--> v3
v7 --"ontolex:lexicalForm"--> a3
bind0[/"concat(str(?s),' (',?s,')')"/]
v3 --o bind0
bind0 --as--o v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a4 -."wikibase:grammaticalFeature".-> c12
a4 --"ontolex:representation"--> v5
v7 --"ontolex:lexicalForm"--> a4
bind1[/"concat(str(?p),' (',?p,')')"/]
v5 --o bind1
bind1 --as--o v6
end
bind5[/"sample(?lexeme)"/]
v7 --o bind5
bind5 --as--o v7
bind6[/"?sl"/]
v4 --o bind6
bind6 --as--o v7
bind7[/"?pl"/]
v6 --o bind7
bind7 --as--o v8