-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #387 from DeleMike/fix/make-sparql-queries-atomic
Refactor SPARQL queries into atomic structures:
- Loading branch information
Showing
227 changed files
with
1,358 additions
and
382 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Arabic/adjectives/query_adjectives.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Arabic/adverbs/query_adverbs.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
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
13 changes: 13 additions & 0 deletions
13
src/scribe_data/language_data_extraction/Arabic/proper_nouns/query_proper_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,13 @@ | ||
# tool: scribe-data | ||
# All Arabic (Q13955) proper nouns and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?properNoun | ||
|
||
WHERE { | ||
?lexeme dct:language wd:Q13955 ; | ||
wikibase:lexicalCategory wd:Q147276 ; | ||
wikibase:lemma ?properNoun . | ||
} |
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Arabic/verbs/query_verbs_1.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Arabic/verbs/query_verbs_2.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Arabic/verbs/query_verbs_3.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Basque/adjectives/query_adjectives.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Basque/adverbs/query_adverbs.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
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
13 changes: 13 additions & 0 deletions
13
src/scribe_data/language_data_extraction/Basque/proper_nouns/query_proper_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,13 @@ | ||
# tool: scribe-data | ||
# All Basque (Q8752) nouns and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?properNoun | ||
|
||
WHERE { | ||
?lexeme dct:language wd:Q8752 ; | ||
wikibase:lexicalCategory wd:Q147276; | ||
wikibase:lemma ?properNoun . | ||
} |
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Basque/verbs/query_verbs.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Bengali/adjectives/query_adjectives.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Bengali/adverbs/query_adverbs.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
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
26 changes: 26 additions & 0 deletions
26
src/scribe_data/language_data_extraction/Bengali/postpositions/query_postpositions.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,26 @@ | ||
# tool: scribe-data | ||
# All Bengali (Bangla Q9610) postpositions and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?preposition | ||
?case | ||
|
||
WHERE { | ||
?lexeme dct:language wd:Q9610 ; | ||
wikibase:lexicalCategory wd:Q161873 ; | ||
wikibase:lemma ?preposition . | ||
|
||
# MARK: Corresponding Case | ||
|
||
OPTIONAL { | ||
?lexeme wdt:P5713 ?caseForm . | ||
} . | ||
|
||
SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". | ||
?caseForm rdfs:label ?case . | ||
} | ||
} |
8 changes: 2 additions & 6 deletions
8
src/scribe_data/language_data_extraction/Bengali/prepositions/query_prepositions.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
47 changes: 47 additions & 0 deletions
47
src/scribe_data/language_data_extraction/Bengali/proper_nouns/query_proper_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,47 @@ | ||
# tool: scribe-data | ||
# All Bengali (Bangla Q9610) nouns and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?nominative | ||
?genitive | ||
?accusative | ||
?locative | ||
|
||
WHERE { | ||
?lexeme dct:language wd:Q9610 ; | ||
wikibase:lexicalCategory wd:Q147276 ; | ||
|
||
# MARK: Nminative | ||
|
||
OPTIONAL { | ||
?lexeme ontolex:lexicalForm ?nomForm . | ||
?nomForm ontolex:representation ?nominative ; | ||
wikibase:grammaticalFeature wd:Q131105 ; | ||
} . | ||
|
||
# MARK: Genitive | ||
|
||
OPTIONAL { | ||
?lexeme ontolex:lexicalForm ?genForm . | ||
?genForm ontolex:representation ?genitive ; | ||
wikibase:grammaticalFeature wd:Q146233 ; | ||
} . | ||
|
||
# MARK: Accusative | ||
|
||
OPTIONAL { | ||
?lexeme ontolex:lexicalForm ?accForm . | ||
?accForm ontolex:representation ?accusative ; | ||
wikibase:grammaticalFeature wd:Q146078 ; | ||
} . | ||
|
||
# MARK: Locative | ||
|
||
OPTIONAL { | ||
?lexeme ontolex:lexicalForm ?locForm . | ||
?locForm ontolex:representation ?locative ; | ||
wikibase:grammaticalFeature wd:Q202142 ; | ||
} . | ||
} |
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Bengali/verbs/query_verbs.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Chinese/Mandarin/adjectives/query_adjectives.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Chinese/Mandarin/adverbs/query_adverbs.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
6 changes: 2 additions & 4 deletions
6
src/scribe_data/language_data_extraction/Chinese/Mandarin/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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
# tool: scribe-data | ||
# All Standard Mandarin Chinese (Q727694) nouns. | ||
# All Standard Mandarin Chinese (Q727694) nouns and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?noun | ||
|
||
WHERE { | ||
VALUES ?nounTypes {wd:Q1084 wd:Q147276} # Nouns and proper nouns | ||
|
||
?lexeme dct:language wd:Q727694 ; | ||
wikibase:lexicalCategory ?nounTypes ; | ||
wikibase:lexicalCategory wd:Q1084 ; | ||
wikibase:lemma ?noun . | ||
} |
2 changes: 1 addition & 1 deletion
2
...ibe_data/language_data_extraction/Chinese/Mandarin/prepositions/query_prepositions.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
13 changes: 13 additions & 0 deletions
13
...ibe_data/language_data_extraction/Chinese/Mandarin/proper_nouns/query_proper_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,13 @@ | ||
# tool: scribe-data | ||
# All Standard Mandarin Chinese (Q727694) proper nouns and the given forms. | ||
# Enter this query at https://query.wikidata.org/. | ||
|
||
SELECT | ||
(REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) | ||
?properNoun | ||
|
||
WHERE { | ||
?lexeme dct:language wd:Q727694 ; | ||
wikibase:lexicalCategory wd:Q147276 ; | ||
wikibase:lemma ?properNoun . | ||
} |
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Chinese/Mandarin/verbs/query_verbs.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Czech/adjectives/query_adjectives_1.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Czech/adjectives/query_adjectives_2.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Czech/adjectives/query_adjectives_3.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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Czech/adverbs/query_adverbs.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
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
2 changes: 1 addition & 1 deletion
2
src/scribe_data/language_data_extraction/Czech/prepositions/query_prepositions.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
Oops, something went wrong.