diff --git a/src/scribe_data/language_data_extraction/Persian/prepositions/query_prepositions.sparql b/src/scribe_data/language_data_extraction/Persian/prepositions/query_prepositions.sparql new file mode 100644 index 000000000..d93687702 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/prepositions/query_prepositions.sparql @@ -0,0 +1,13 @@ +# tool: scribe-data +# All persian (Q9168) prepositions and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?prepositions + +WHERE { + ?lexeme dct:language wd:Q9168 ; + wikibase:lexicalCategory wd:Q4833830 ; + wikibase:lemma ?prepositions . +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_1.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_1.sparql new file mode 100644 index 000000000..9c5efbea2 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_1.sparql @@ -0,0 +1,44 @@ +# tool: scribe-data +# All Persian (Q9168) verbs (Q24905) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?aorist + ?participle + ?wordStem + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q24905; + wikibase:lemma ?infinitiveForm. + + #MARK: infinitive + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?infinitiveLexForm. + ?infinitiveLexForm ontolex:representation ?infinitive; + wikibase:grammaticalFeature wd:Q179230. + } + #MARK: aorist + OPTIONAL { + ?lexeme ontolex:lexicalForm ?aoristForm. + ?aoristForm ontolex:representation ?aorist; + wikibase:grammaticalFeature wd:Q216497. + } + #MARK: participle + OPTIONAL { + ?lexeme ontolex:lexicalForm ?participleForm. + ?participleForm ontolex:representation ?participle; + wikibase:grammaticalFeature wd:Q814722. + FILTER(lang(?participle) = "fa") . + } + #MARK: wordStem + OPTIONAL { + ?lexeme ontolex:lexicalForm ?wordStemForm. + ?wordStemForm ontolex:representation ?wordStem; + wikibase:grammaticalFeature wd:Q210523. + FILTER(lang(?wordStem) = "fa") . + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_2.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_2.sparql new file mode 100644 index 000000000..a3d340b26 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_2.sparql @@ -0,0 +1,55 @@ +# tool: scribe-data +# All Persian (Q9168) verbs (Q24905) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?firstPersonSingPresent + ?secondPersonSingPresent + ?thirdPersonSingPresent + ?firstPersonPluralPresent + ?secondPersonPluralPresent + ?thirdPersonPluralPresent + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q24905. + + # MARK: Infinitive + ?lexeme ontolex:lexicalForm ?infinitiveForm . + ?infinitiveForm ontolex:representation ?infinitive ; + wikibase:grammaticalFeature wd:Q179230 . + + # MARK: Present Tense Forms + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonSingPresentForm. + ?firstPersonSingPresentForm ontolex:representation ?firstPersonSingPresent; + wikibase:grammaticalFeature wd:Q21714344 , wd:Q110786 , wd:Q192613. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonSingPresentForm. + ?secondPersonSingPresentForm ontolex:representation ?secondPersonSingPresent; + wikibase:grammaticalFeature wd:Q51929049 , wd:Q110786 , wd:Q192613. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonSingPresentForm. + ?thirdPersonSingPresentForm ontolex:representation ?thirdPersonSingPresent; + wikibase:grammaticalFeature wd:Q51929074 , wd:Q110786 , wd:Q192613. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonPluralPresentForm. + ?firstPersonPluralPresentForm ontolex:representation ?firstPersonPluralPresent; + wikibase:grammaticalFeature wd:Q21714344 , wd:Q146786 , wd:Q192613. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonPluralPresentForm. + ?secondPersonPluralPresentForm ontolex:representation ?secondPersonPluralPresent; + wikibase:grammaticalFeature wd:Q51929049 , wd:Q146786 , wd:Q192613. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonPluralPresentForm. + ?thirdPersonPluralPresentForm ontolex:representation ?thirdPersonPluralPresent; + wikibase:grammaticalFeature wd:Q51929074 , wd:Q146786 , wd:Q192613. + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_3.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_3.sparql new file mode 100644 index 000000000..b7d27ca62 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_3.sparql @@ -0,0 +1,55 @@ +# tool: scribe-data +# All Persian (Q9168) verbs and the given perfect tense forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?firstPersonSingPerfect + ?secondPersonSingPerfect + ?thirdPersonSingPerfect + ?firstPersonPluralPerfect + ?secondPersonPluralPerfect + ?thirdPersonPluralPerfect + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q24905. + + # MARK: Infinitive + ?lexeme ontolex:lexicalForm ?infinitiveForm . + ?infinitiveForm ontolex:representation ?infinitive ; + wikibase:grammaticalFeature wd:Q179230 . + + # MARK: Perfect Tense Forms + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonSingPerfectForm. + ?firstPersonSingPerfectForm ontolex:representation ?firstPersonSingPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q21714344 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonSingPerfectForm. + ?secondPersonSingPerfectForm ontolex:representation ?secondPersonSingPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929049 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonSingPerfectForm. + ?thirdPersonSingPerfectForm ontolex:representation ?thirdPersonSingPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929074 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonPluralPerfectForm. + ?firstPersonPluralPerfectForm ontolex:representation ?firstPersonPluralPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q21714344 , wd:Q146786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonPluralPerfectForm. + ?secondPersonPluralPerfectForm ontolex:representation ?secondPersonPluralPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929049 , wd:Q146786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonPluralPerfectForm. + ?thirdPersonPluralPerfectForm ontolex:representation ?thirdPersonPluralPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929074 , wd:Q146786. + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_4.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_4.sparql new file mode 100644 index 000000000..ee4692ede --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_4.sparql @@ -0,0 +1,55 @@ +# tool: scribe-data +# All Persian (Q9168) verbs and the given present perfect tense forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?firstPersonSingPresentPerfect + ?secondPersonSingPresentPerfect + ?thirdPersonSingPresentPerfect + ?firstPersonPluralPresentPerfect + ?secondPersonPluralPresentPerfect + ?thirdPersonPluralPresentPerfect + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q24905. + + # MARK: Infinitive + ?lexeme ontolex:lexicalForm ?infinitiveForm . + ?infinitiveForm ontolex:representation ?infinitive ; + wikibase:grammaticalFeature wd:Q179230 . + + # MARK: Present Perfect Forms + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonSingPresentPerfectForm. + ?firstPersonSingPresentPerfectForm ontolex:representation ?firstPersonSingPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q21714344 , wd:Q192613 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonSingPresentPerfectForm. + ?secondPersonSingPresentPerfectForm ontolex:representation ?secondPersonSingPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929049 ,wd:Q192613 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonSingPresentPerfectForm. + ?thirdPersonSingPresentPerfectForm ontolex:representation ?thirdPersonSingPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929074 ,wd:Q192613 , wd:Q110786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonPluralPresentPerfectForm. + ?firstPersonPluralPresentPerfectForm ontolex:representation ?firstPersonPluralPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q21714344 ,wd:Q192613 , wd:Q146786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonPluralPresentPerfectForm. + ?secondPersonPluralPresentPerfectForm ontolex:representation ?secondPersonPluralPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929049 ,wd:Q192613 , wd:Q146786. + } + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonPluralPresentPerfectForm. + ?thirdPersonPluralPresentPerfectForm ontolex:representation ?thirdPersonPluralPresentPerfect; + wikibase:grammaticalFeature wd:Q625420 , wd:Q51929074 ,wd:Q192613 , wd:Q146786. + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_5.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_5.sparql new file mode 100644 index 000000000..42d3293f4 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_5.sparql @@ -0,0 +1,61 @@ +# tool: scribe-data +# All Persian (Q9168) verbs (Q24905) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?firstPersonSingSubjunctive + ?secondPersonSingSubjunctive + ?thirdPersonSingSubjunctive + ?firstPersonPluralSubjunctive + ?secondPersonPluralSubjunctive + ?thirdPersonPluralSubjunctive + +WHERE { + ?lexeme dct:language wd:Q9168; + wikibase:lexicalCategory wd:Q24905; + wikibase:lemma ?infinitiveForm. + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?infinitiveLexForm. + ?infinitiveLexForm ontolex:representation ?infinitive; + wikibase:grammaticalFeature wd:Q179230. + } + #MARK: subjunctive + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonSingSubjunctiveForm. + ?firstPersonSingSubjunctiveForm ontolex:representation ?firstPersonSingSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q21714344 , wd:Q110786. + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonSingSubjunctiveForm. + ?secondPersonSingSubjunctiveForm ontolex:representation ?secondPersonSingSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q51929049 , wd:Q110786. + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonSingSubjunctiveForm. + ?thirdPersonSingSubjunctiveForm ontolex:representation ?thirdPersonSingSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q51929074 , wd:Q110786. + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?firstPersonPluralSubjunctiveForm. + ?firstPersonPluralSubjunctiveForm ontolex:representation ?firstPersonPluralSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q21714344 , wd:Q146786. + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?secondPersonPluralSubjunctiveForm. + ?secondPersonPluralSubjunctiveForm ontolex:representation ?secondPersonPluralSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q51929049 , wd:Q146786. + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?thirdPersonPluralSubjunctiveForm. + ?thirdPersonPluralSubjunctiveForm ontolex:representation ?thirdPersonPluralSubjunctive; + wikibase:grammaticalFeature wd:Q473746 , wd:Q51929074 , wd:Q146786. + } +} diff --git a/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_6.sparql b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_6.sparql new file mode 100644 index 000000000..cfebdb425 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Persian/verbs/query_verbs_6.sparql @@ -0,0 +1,61 @@ +# tool: scribe-data +# All Persian (Q9168) verbs (Q24905) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?infinitive + ?indicative1PS + ?indicative2PS + ?indicative3PS + ?indicative1PP + ?indicative2PP + ?indicative3PP + + +WHERE { + ?lexeme dct:language wd:Q9168 ; + wikibase:lexicalCategory wd:Q24905 . + + #MARK: infinitive + ?lexeme ontolex:lexicalForm ?infinitiveForm . + ?infinitiveForm ontolex:representation ?infinitive ; + wikibase:grammaticalFeature wd:Q179230 . + + # MARK: Indicative + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative1PSForm . + ?indicative1PSForm ontolex:representation ?indicative1PS ; + wikibase:grammaticalFeature wd:Q21714344, wd:Q110786, wd:Q682111 . + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative2PSForm . + ?indicative2PSForm ontolex:representation ?indicative2PS ; + wikibase:grammaticalFeature wd:Q51929049, wd:Q110786, wd:Q682111 . + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative3PSForm . + ?indicative3PSForm ontolex:representation ?indicative3PS ; + wikibase:grammaticalFeature wd:Q51929074, wd:Q110786, wd:Q682111 . + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative1PPForm . + ?indicative1PPForm ontolex:representation ?indicative1PP ; + wikibase:grammaticalFeature wd:Q21714344, wd:Q146786, wd:Q682111 . + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative2PPForm . + ?indicative2PPForm ontolex:representation ?indicative2PP ; + wikibase:grammaticalFeature wd:Q51929049, wd:Q146786, wd:Q682111 . + } + + OPTIONAL { + ?lexeme ontolex:lexicalForm ?indicative3PPForm . + ?indicative3PPForm ontolex:representation ?indicative3PP ; + wikibase:grammaticalFeature wd:Q51929074, wd:Q146786, wd:Q682111 . + } +} diff --git a/src/scribe_data/resources/language_metadata.json b/src/scribe_data/resources/language_metadata.json index 7ab2145bf..b7dfb7d71 100755 --- a/src/scribe_data/resources/language_metadata.json +++ b/src/scribe_data/resources/language_metadata.json @@ -115,6 +115,10 @@ } } }, + "persian": { + "iso": "fa", + "qid": "Q9168" + }, "pidgin": { "sub_languages": { "nigerian": { diff --git a/tests/load/test_update_utils.py b/tests/load/test_update_utils.py index 43eaa2038..d0afc3c89 100644 --- a/tests/load/test_update_utils.py +++ b/tests/load/test_update_utils.py @@ -159,6 +159,7 @@ def test_list_all_languages(): "mandarin", "nigerian", "nynorsk", + "persian", "polish", "portuguese", "russian",