query-a3557f40eeb071745625af4d50085255

rq turtle/ttl

title: Ukrainian nouns by gender SELECT ?lemma ?gender_label ?lexeme WITH { SELECT DISTINCT ?lemma WHERE { VALUES ?gender { wd:Q499327 wd:Q1775415 wd:Q1775461 } ?lexeme dct:language wd:Q8798; wikibase:lexicalCategory wd:Q1084; wdt:P5185 ?gender; wikibase:lemma ?lemma. } ORDER BY CONCAT(MD5(?lemma), STR(NOW())) } AS %randomLemmas WHERE { INCLUDE %randomLemmas. ?lexeme wikibase:lemma ?lemma; wdt:P5185 ?gender. ?gender rdfs:label ?gender_label . FILTER(LANG(?gender_label) = 'en') } GROUP BY ?lemma ?lexeme ?gender_label HAVING(COUNT(?gender) = 1)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>
#title: Ukrainian nouns by gender
SELECT ?lemma ?gender_label ?lexeme  WHERE {
   {
  SELECT DISTINCT ?lemma WHERE {
    VALUES ?gender { wd:Q499327 wd:Q1775415 wd:Q1775461 }
    ?lexeme dct:language wd:Q8798;
            wikibase:lexicalCategory wd:Q1084;
            wdt:P5185 ?gender;
            wikibase:lemma ?lemma.
  }
  ORDER BY CONCAT(MD5(?lemma), STR(NOW()))
}
  ?lexeme wikibase:lemma ?lemma;
          wdt:P5185 ?gender.
     ?gender rdfs:label ?gender_label .
     FILTER(LANG(?gender_label) = 'en')
}
GROUP BY ?lemma ?lexeme ?gender_label
HAVING(COUNT(?gender) = 1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?_anon_42b5416610844a34809f33a099ae9de143442") v3("?gender") v1("?gender_label"):::projected v2("?lemma"):::projected v4("?lexeme"):::projected a1((" ")) c6(["wd:Q1084"]):::iri c4(["wd:Q8798"]):::iri f0[[" = '1^^xsd:integer'"]] f0 --> a1 f1[["?gender_label = 'en'"]] f1 --> v1 bind2[/VALUES ?gender/] bind2-->v3 bind20(["wd:Q499327"]) bind20 --> bind2 bind21(["wd:Q1775415"]) bind21 --> bind2 bind22(["wd:Q1775461"]) bind22 --> bind2 v4 --"dct:language"--> c4 v4 --"wikibase:lexicalCategory"--> c6 v4 --"wdt:P5185"--> v3 v4 --"wikibase:lemma"--> v2 v4 --"wikibase:lemma"--> v2 v4 --"wdt:P5185"--> v3 v3 --"rdfs:label"--> v1 bind4[/"count(?gender)"/] v3 --o bind4 bind4 --as--o v5