-
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.
created folder for Punjabi language and added query
- Loading branch information
1 parent
3613d2f
commit 7d08d75
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
src/scribe_data/language_data_extraction/Punjabi/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,45 @@ | ||
# tool: scribe-data | ||
# All Punjabi (from Gurmukhi Q58635) nouns and their gender. | ||
# Enter this query at https://query.wikidata.org/. | ||
# Note the necessity to filter for "pa" to select Gurmukhi words. | ||
|
||
SELECT DISTINCT | ||
?lexeme | ||
(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:Q58635 ; | ||
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 . | ||
} | ||
} . | ||
|
||
BIND(lang(?singular) AS ?langSingular) | ||
BIND(lang(?plural) AS ?langPlural) | ||
|
||
FILTER(?langSingular = "pa") | ||
FILTER(?langPlural = "pa") | ||
|
||
SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". | ||
?nounGender rdfs:label ?gender . | ||
} | ||
} |