-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from DeleMike/feat/nigerian-pidgin-noun-query
Add SPARQL query for extracting Nigerian Pidgin nouns with gender and plurals
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/scribe_data/language_data_extraction/Pidgin/Nigerian/nouns/query_nouns.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# tool: scribe-data | ||
# 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 wd:Q147276} # Nouns and pronouns | ||
|
||
?lexeme dct:language wd:Q33655 ; # Nigerian Pidgin | ||
wikibase:lexicalCategory ?nounTypes ; | ||
wikibase:lemma ?singular . | ||
|
||
# MARK: Plural | ||
|
||
OPTIONAL { | ||
?lexeme ontolex:lexicalForm ?pluralForm . | ||
?pluralForm ontolex:representation ?plural ; | ||
wikibase:grammaticalFeature wd:Q146786 ; | ||
} . | ||
|
||
# MARK: Gender(s) | ||
|
||
OPTIONAL { | ||
?lexeme wdt:P5185 ?nounGender . | ||
FILTER NOT EXISTS { | ||
?lexeme wdt:P31 wd:Q202444 . | ||
} | ||
} . | ||
|
||
SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". | ||
?nounGender rdfs:label ?gender . | ||
} | ||
} |