Skip to content

Commit

Permalink
Minor formatting for query
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Oct 8, 2024
1 parent f595961 commit dcdc0fd
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# tool: scribe-data
# All Nigerian Pidgin (Q33655) nouns and their gender.
# All Nigerian Pidgin (Q33655) nouns, their plurals and their genders.
# Enter this query at https://query.wikidata.org/.

SELECT DISTINCT
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID)
?singular
?plural
?gender

WHERE {
VALUES ?nounTypes {wd:Q1084} # Nouns
VALUES ?nounTypes {wd:Q1084 wd:Q147276} # Nouns and pronouns

# Main noun data
?lexeme dct:language wd:Q33655 ; # Nigerian Pidgin
wikibase:lexicalCategory ?nounTypes ;
wikibase:lemma ?singular .

# Plural form (if exists)
# MARK: Plural

OPTIONAL {
?lexeme ontolex:lexicalForm ?pluralForm .
?pluralForm ontolex:representation ?plural ;
wikibase:grammaticalFeature wd:Q146786 ; # Plural
wikibase:grammaticalFeature wd:Q146786 ;
} .

# Gender (if specified)
# MARK: Gender(s)

OPTIONAL {
?lexeme wdt:P5185 ?nounGender . # Grammatical gender
?lexeme wdt:P5185 ?nounGender .
FILTER NOT EXISTS {
?lexeme wdt:P31 wd:Q202444 .
}
} .

# Get readable gender labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE]".
?nounGender rdfs:label ?gender .
Expand Down

0 comments on commit dcdc0fd

Please sign in to comment.