query-eef133c87fca2730d7d04d0126da7ddf

rq turtle/ttl

Scribe help: query noun genders (P5185), but not for given names (Q202444)Hi everyone :) is to change the noun queries so that given names do not have their gender. The current query for all German nouns and pronouns that gets plurals and genders is: issue yesterday. I'm realizing that there is the potential that the keyboard would inadvertently misgender someone given many lexemes that are given names (Q202444) also have a grammatical gender (P5185). The goal for the Scribe I found for issueI'm currently working on an

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 ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?singular ?plural ?gender WHERE {

  # Nouns and pronouns.
  VALUES ?nounTypes { wd:Q1084 wd:Q147276 }
  ?lexeme a ontolex:LexicalEntry ;
            dct:language wd:Q188 ;
            wikibase:lexicalCategory ?noun .
  FILTER(?noun = ?nounTypes)

  # Optional selection of nominative singular forms.
  OPTIONAL {
    ?lexeme ontolex:lexicalForm ?singularForm .
    ?singularForm ontolex:representation ?singular ;
                  wikibase:grammaticalFeature wd:Q110786 ;
                  wikibase:grammaticalFeature wd:Q131105 ;
  } .

  # Optional selection of nominative plural forms.
  OPTIONAL {
    ?lexeme ontolex:lexicalForm ?pluralForm .
    ?pluralForm ontolex:representation ?plural ;
                wikibase:grammaticalFeature wd:Q146786 ;
                wikibase:grammaticalFeature wd:Q131105 ;
  } .

  # Optional selection of genders.
  OPTIONAL {
    ?lexeme wdt:P5185 ?nounGender .
  } .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE]".
    ?nounGender rdfs:label ?gender .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?gender"):::projected v3("?lexeme") v1("?noun") v8("?nounGender") v3("?nounTypes") v7("?plural"):::projected v6("?pluralForm") v5("?singular"):::projected v4("?singularForm") c2(["ontolex:LexicalEntry"]):::iri c10(["wd:Q131105"]):::iri c9(["wd:Q110786"]):::iri c11(["wd:Q146786"]):::iri c14(["bd:serviceParam"]):::iri c16(["#91;AUTO_LANGUAGE#93;"]):::literal c4(["wd:Q188"]):::iri f0[["?noun = ?nounTypes"]] f0 --> v1 f0 --> v3 bind1[/VALUES ?nounTypes/] bind1-->v3 bind10(["wd:Q1084"]) bind10 --> bind1 bind11(["wd:Q147276"]) bind11 --> bind1 v3 --"a"--> c2 v3 --"dct:language"--> c4 v3 --"wikibase:lexicalCategory"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."ontolex:lexicalForm".-> v4 v4 --"ontolex:representation"--> v5 v4 --"wikibase:grammaticalFeature"--> c9 v4 --"wikibase:grammaticalFeature"--> c10 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."ontolex:lexicalForm".-> v6 v6 --"ontolex:representation"--> v7 v6 --"wikibase:grammaticalFeature"--> c11 v6 --"wikibase:grammaticalFeature"--> c10 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P5185".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 v8 --"rdfs:label"--> v9 end