query-79c84ec7444641bb44241362d107dd24
Not to mix QLever approximationtinyurl.com/2bst2zc6 - Orb is better (Q33531945)Category:ru:Parts of speech (Q65579409)Category:Russian lemmas by word class (Q31156892)Category:ru:Grammar (Q64778582)Category:Russian grammar (Q7737)Russian (Q33531088)Category:en:Parts of speech (Q65576801)Category:English lemmas by word class (Q30578969)Category:en:Grammar Q31156736 (Q1860)English (Q65568447)Category:af:Parts of speech Q65568340 (Q30524943)Category:af:Grammar Q31832102 (Q14196)Afrikaans Parts of speech (semcat) Words by POS "Grammar" (semcat) Grammatical categories Language and so on...
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?langLabel ?cat1 ?cat1Label ?cods1 ?cat2 ?cat2Label ?cods2 ?cat3 ?cat3Label ?cods3 ?cat4 ?cat4Label ?cods4 WHERE {
?lang wdt:P31/wdt:P279* wd:Q20162172.
# VALUES ?lang {wd:Q9292}
OPTIONAL {?cat1 wdt:P971 wd:Q980357.
?cat1 wdt:P971 ?lang.
OPTIONAL {SELECT ?cat1 (GROUP_CONCAT(distinct ?cod1; separator=', ') as ?cods1) WHERE {
?wiktSitelink schema:isPartOf [ wikibase:wikiGroup "wiktionary" ];
schema:inLanguage ?cod1;
schema:about ?cat1. } GROUP BY ?cat1 ORDER BY ?cod1 }
}
OPTIONAL {?cat2 wdt:P971 wd:Q8091; wdt:P971 wd:Q54662266; wdt:P971 ?lang.
OPTIONAL {SELECT ?cat2 (GROUP_CONCAT(distinct ?cod2; separator=', ') as ?cods2) WHERE {
?wiktSitelink schema:isPartOf [ wikibase:wikiGroup "wiktionary" ];
schema:inLanguage ?cod2;
schema:about ?cat2. } GROUP BY ?cat2 ORDER BY ?cod2 }
}
OPTIONAL {?cat3 wdt:P971 wd:Q30434250; wdt:P971 wd:Q54734643; wdt:P971 ?lang.
OPTIONAL {SELECT ?cat3 (GROUP_CONCAT(distinct ?cod3; separator=', ') as ?cods3) WHERE {
?wiktSitelink schema:isPartOf [ wikibase:wikiGroup "wiktionary" ];
schema:inLanguage ?cod3;
schema:about ?cat3. } GROUP BY ?cat3 ORDER BY ?cod3 }
}
OPTIONAL {?cat4 wdt:P971 wd:Q82042; wdt:P971 wd:Q54662266; wdt:P971 ?lang.
OPTIONAL {SELECT ?cat4 (GROUP_CONCAT(distinct ?cod4; separator=', ') as ?cods4) WHERE {
?wiktSitelink schema:isPartOf [ wikibase:wikiGroup "wiktionary" ];
schema:inLanguage ?cod4;
schema:about ?cat4. } GROUP BY ?cat4 ORDER BY ?cod4 }
}
FILTER (STR(?cat1)!="" || STR (?cat2) != "" || STR(?cat3) != "" || STR(?cat4)!="")
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,en". }
}
ORDER BY ?langLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cat1"):::projected
v3("?cat2"):::projected
v4("?cat3"):::projected
v5("?cat4"):::projected
v7("?cod1")
v10("?cod2")
v12("?cod3")
v14("?cod4")
v9("?cods1"):::projected
v11("?cods2"):::projected
v13("?cods3"):::projected
v15("?cods4"):::projected
v6("?lang")
v1("?langLabel"):::projected
v8("?wiktSitelink")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c15(["wd:Q54734643"]):::iri
c14(["wd:Q30434250"]):::iri
c20(["#91;AUTO_LANGUAGE#93;,fr,en"]):::literal
c6(["wd:Q980357"]):::iri
c12(["wd:Q8091"]):::iri
c16(["wd:Q82042"]):::iri
c18(["bd:serviceParam"]):::iri
c4(["wd:Q20162172"]):::iri
c8(["wiktionary"]):::literal
c13(["wd:Q54662266"]):::iri
f0[["(str(?cat1) != '' || (str(?cat2) != '' || (str(?cat3) != '' || str(?cat4) != '')))"]]
f0 --> v2
f0 --> v3
f0 --> v4
f0 --> v5
v6 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P971".-> c6
v2 --"wdt:P971"--> v6
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a2 -."wikibase:wikiGroup".-> c8
v8 --"schema:isPartOf"--> a2
v8 --"schema:inLanguage"--> v7
v8 --"schema:about"--> v2
bind2[/"?cod1"/]
v7 --o bind2
bind2 --as--o v9
end
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P971".-> c12
v3 --"wdt:P971"--> c13
v3 --"wdt:P971"--> v6
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
a3 -."wikibase:wikiGroup".-> c8
v8 --"schema:isPartOf"--> a3
v8 --"schema:inLanguage"--> v10
v8 --"schema:about"--> v3
bind4[/"?cod2"/]
v10 --o bind4
bind4 --as--o v11
end
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P971".-> c14
v4 --"wdt:P971"--> c15
v4 --"wdt:P971"--> v6
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
a4 -."wikibase:wikiGroup".-> c8
v8 --"schema:isPartOf"--> a4
v8 --"schema:inLanguage"--> v12
v8 --"schema:about"--> v4
bind6[/"?cod3"/]
v12 --o bind6
bind6 --as--o v13
end
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P971".-> c16
v5 --"wdt:P971"--> c13
v5 --"wdt:P971"--> v6
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
a5 -."wikibase:wikiGroup".-> c8
v8 --"schema:isPartOf"--> a5
v8 --"schema:inLanguage"--> v14
v8 --"schema:about"--> v5
bind8[/"?cod4"/]
v14 --o bind8
bind8 --as--o v15
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c20
end