query-8de2fd77fdf53871cb326e93f7cd68a8
.Auregann by suggestion. After a on TwitterOriginally posted
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?lexeme ?lemma ?languageLabel ?number WHERE {
?lexeme wikibase:lemma ?lemma;
dct:language ?language;
ontolex:sense/wdt:P5137 [
wdt:P31 wd:Q21199; # exclude ordinal numbers (“fifth” is 5 letters long)
wdt:P1181 ?number
].
FILTER(STRLEN(?lemma) = ?number)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?number)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?language")
v2("?lemma"):::projected
v3("?lexeme"):::projected
v1("?number"):::projected
a2((" "))
a1((" "))
c4(["wd:Q21199"]):::iri
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["string-length(?lemma) = ?number"]]
f0 --> v2
f0 --> v1
v3 --"wikibase:lemma"--> v2
v3 --"dct:language"--> v4
a1 --"wdt:P31"--> c4
a1 --"wdt:P1181"--> v1
v3 --"ontolex:sense"--> a2
a2 --"wdt:P5137"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end