From d34cbf142feb2ebfdd5044d80dcea123d02431a0 Mon Sep 17 00:00:00 2001 From: Purnama S Rahayu Date: Sat, 19 Oct 2024 00:07:32 +0700 Subject: [PATCH] add Persian query adjectives #400 --- .../adjectives/query_adjectives.sparql | 34 +++++++++++++++++++ .../Persian/nouns/query_nouns.sparql | 26 ++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 src/scribe_data/language_data_extraction/Persian/adjectives/query_adjectives.sparql create mode 100644 src/scribe_data/language_data_extraction/Persian/nouns/query_nouns.sparql diff --git a/src/scribe_data/language_data_extraction/Persian/adjectives/query_adjectives.sparql b/src/scribe_data/language_data_extraction/Persian/adjectives/query_adjectives.sparql new file mode 100644 index 000000000..0b44b6a5f --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/adjectives/query_adjectives.sparql @@ -0,0 +1,34 @@ +# tool: scribe-data +# All Persian (Q9186) adjectives and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?adjective + ?singular + ?plural + +WHERE { + ?lexeme dct:language wd:Q9168 ; + wikibase:lexicalCategory wd:Q34698 ; + wikibase:lemma ?adjective . + FILTER(lang(?adjective) = "fa") + + # MARK: Singular + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?singularForm . + ?singularForm ontolex:representation ?singular ; + wikibase:grammaticalFeature wd:Q110786 . + FILTER(lang(?singular) = "fa") . + } + + # MARK: Plural + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?pluralForm . + ?pluralForm ontolex:representation ?plural ; + wikibase:grammaticalFeature wd:Q146786 . + FILTER(lang(?plural) = "fa") . + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/nouns/query_nouns.sparql b/src/scribe_data/language_data_extraction/Persian/nouns/query_nouns.sparql new file mode 100644 index 000000000..bd738ae7b --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/nouns/query_nouns.sparql @@ -0,0 +1,26 @@ +# tool: scribe-data +# All Persian (Q9186) nouns and the given forms. +# Enter this query at https://query.wikidata.org/. + +# Note: We need to filter for "hi" to remove Urdu (ur) words. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?singular + ?plural + +WHERE { + ?lexeme dct:language wd:Q9168 ; + wikibase:lexicalCategory wd:Q1084 ; + wikibase:lemma ?singular . + FILTER(lang(?singular) = "fa") + + # MARK: Plural + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?pluralForm . + ?pluralForm ontolex:representation ?plural ; + wikibase:grammaticalFeature wd:Q146786 . + FILTER(lang(?plural) = "fa") . + } +}