From 54b060c8a782f4ecd1b26f8dc3b50baace724e64 Mon Sep 17 00:00:00 2001 From: Purnama S Rahayu <52136428+catreedle@users.noreply.github.com> Date: Tue, 22 Oct 2024 07:58:12 +0700 Subject: [PATCH] Persian query nouns, adjectives, adverbs (#452) * add Persian query adjectives #400 * fix comment language qid * remove filter fa for persian query * Persian adverbs query * Minor query formatting --------- Co-authored-by: Andrew Tavis McAllister --- .../adjectives/query_adjectives.sparql | 32 +++++++++++++++++++ .../Persian/adverbs/query_adverbs.sparql | 13 ++++++++ .../Persian/nouns/query_nouns.sparql | 22 +++++++++++++ 3 files changed, 67 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/adverbs/query_adverbs.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..e0e26a6c4 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/adjectives/query_adjectives.sparql @@ -0,0 +1,32 @@ +# tool: scribe-data +# All Persian (Q9168) adjectives (Q34698) 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 . + } + + # MARK: Plural + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?pluralForm . + ?pluralForm ontolex:representation ?plural ; + wikibase:grammaticalFeature wd:Q146786 . + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/adverbs/query_adverbs.sparql b/src/scribe_data/language_data_extraction/Persian/adverbs/query_adverbs.sparql new file mode 100644 index 000000000..d7aa2fd3a --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/adverbs/query_adverbs.sparql @@ -0,0 +1,13 @@ +# tool: scribe-data +# All Persian (Q9168) adverbs (Q380057) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?adverb + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q380057 ; + wikibase:lemma ?adverb . +} 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..1d405f718 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/nouns/query_nouns.sparql @@ -0,0 +1,22 @@ +# tool: scribe-data +# All Persian (Q9168) nouns (Q1084) and the given forms. +# Enter this query at https://query.wikidata.org/. + +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 . + + # MARK: Plural + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?pluralForm . + ?pluralForm ontolex:representation ?plural ; + wikibase:grammaticalFeature wd:Q146786 . + } +}