From 0d699e058905369fc058c1ec62c35ed0678f56cc Mon Sep 17 00:00:00 2001 From: Syeda Nowshin Ibnat Date: Mon, 21 Oct 2024 20:40:33 +0600 Subject: [PATCH 1/2] Polish queries Added adjective, adverb and preposition queries --- .../Polish/adjectives/query_adjective.sparql | 13 +++++++++++++ .../Polish/adverbs/query_adverbs.sparql | 13 +++++++++++++ .../Polish/prepositions/query_prepositions.sparql | 13 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql create mode 100644 src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql create mode 100644 src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql diff --git a/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql b/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql new file mode 100644 index 000000000..286a3dfaf --- /dev/null +++ b/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql @@ -0,0 +1,13 @@ +# tool: scribe-data +# All Polish (Q809) adjectives and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + ?lexeme # unique ID for the data entry + ?adjective # lemma or label of the ID + +WHERE { + ?lexeme dct:language wd:Q809 ; # Polish language + wikibase:lexicalCategory wd:Q34698 ; # Adjectives + wikibase:lemma ?adjective . +} diff --git a/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql b/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql new file mode 100644 index 000000000..a2341ec26 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql @@ -0,0 +1,13 @@ +# tool: scribe-data +# All Polish (Q809) adverbs and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + ?lexeme # unique ID for the data entry + ?adverb # lemma or label of the ID + +WHERE { + ?lexeme dct:language wd:Q809 ; # Polish language + wikibase:lexicalCategory wd:Q380057 ; # Adverbs + wikibase:lemma ?adverb . +} diff --git a/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql b/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql new file mode 100644 index 000000000..8e0431170 --- /dev/null +++ b/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql @@ -0,0 +1,13 @@ +# tool: scribe-data +# All Polish (Q809) prepositions and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + ?lexeme # unique ID for the data entry + ?preposition # lemma or label of the ID + +WHERE { + ?lexeme dct:language wd:Q809 ; # Polish language + wikibase:lexicalCategory wd:Q4833830 ; # Propositions + wikibase:lemma ?preposition . +} From befe6e29ca728c149cf089d8117e06de0b73ea6d Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Thu, 24 Oct 2024 13:09:07 +0200 Subject: [PATCH 2/2] Remove comments and fix lexeme id return for queries --- .../Polish/adjectives/query_adjective.sparql | 10 +++++----- .../Polish/adverbs/query_adverbs.sparql | 10 +++++----- .../Polish/prepositions/query_prepositions.sparql | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql b/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql index 286a3dfaf..c03f00acf 100644 --- a/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql +++ b/src/scribe_data/language_data_extraction/Polish/adjectives/query_adjective.sparql @@ -1,13 +1,13 @@ # tool: scribe-data -# All Polish (Q809) adjectives and the given forms. +# All Polish (Q809) adjectives (Q34698) and the given forms. # Enter this query at https://query.wikidata.org/. SELECT - ?lexeme # unique ID for the data entry - ?adjective # lemma or label of the ID + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?adjective WHERE { - ?lexeme dct:language wd:Q809 ; # Polish language - wikibase:lexicalCategory wd:Q34698 ; # Adjectives + ?lexeme dct:language wd:Q809 ; + wikibase:lexicalCategory wd:Q34698 ; wikibase:lemma ?adjective . } diff --git a/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql b/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql index a2341ec26..cf2ca7cda 100644 --- a/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql +++ b/src/scribe_data/language_data_extraction/Polish/adverbs/query_adverbs.sparql @@ -1,13 +1,13 @@ # tool: scribe-data -# All Polish (Q809) adverbs and the given forms. +# All Polish (Q809) adverbs (Q380057) and the given forms. # Enter this query at https://query.wikidata.org/. SELECT - ?lexeme # unique ID for the data entry - ?adverb # lemma or label of the ID + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?adverb WHERE { - ?lexeme dct:language wd:Q809 ; # Polish language - wikibase:lexicalCategory wd:Q380057 ; # Adverbs + ?lexeme dct:language wd:Q809 ; + wikibase:lexicalCategory wd:Q380057 ; wikibase:lemma ?adverb . } diff --git a/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql b/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql index 8e0431170..cd044d139 100644 --- a/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql +++ b/src/scribe_data/language_data_extraction/Polish/prepositions/query_prepositions.sparql @@ -1,13 +1,13 @@ # tool: scribe-data -# All Polish (Q809) prepositions and the given forms. +# All Polish (Q809) prepositions (Q4833830) and the given forms. # Enter this query at https://query.wikidata.org/. SELECT - ?lexeme # unique ID for the data entry - ?preposition # lemma or label of the ID + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?preposition WHERE { - ?lexeme dct:language wd:Q809 ; # Polish language - wikibase:lexicalCategory wd:Q4833830 ; # Propositions + ?lexeme dct:language wd:Q809 ; + wikibase:lexicalCategory wd:Q4833830 ; wikibase:lemma ?preposition . }