Skip to content

Commit

Permalink
Merge pull request #40 from scribe-org/english-verbs
Browse files Browse the repository at this point in the history
Add English verbs query file
  • Loading branch information
andrewtavis authored Aug 20, 2023
2 parents c5e2e34 + 1aebb46 commit 0312232
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Scribe-Data tries to follow [semantic versioning](https://semver.org/), a MAJOR.

Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).

# [Upcoming] Scribe-Data 3.2.0

### ✨ Features

- The data and process needed for an English keyboard has been added.
- The Wikidata queries for English have been updated to get all nouns and verbs.
<!-- - Formatting scripts have been written to prepare the queried data and load it into an SQLite database.
- English has been added to the data ETL process. -->
- The data update process has been cleaned up in preparation for future changes to Scribe-Data and to implement better practices.

# Scribe-Data 3.1.0

### ✨ Features
Expand Down
43 changes: 34 additions & 9 deletions src/scribe_data/extract_transform/English/verbs/query_verbs.sparql
Original file line number Diff line number Diff line change
@@ -1,28 +1,53 @@
# All English (Q1860) verbs and the currently implemented tenses for each.
# Enter this query at https://query.wikidata.org/.

SELECT DISTINCT ?verb ?simplePast ?pastParticiple WHERE {
SELECT DISTINCT ?infinitive ?presFPS ?presTPS ?simpPast ?pastPart WHERE {
# Infinitive (required)
?lexeme a ontolex:LexicalEntry ;
dct:language wd:Q1860 ;
wikibase:lexicalCategory wd:Q24905 ;
wikibase:lemma ?lemma .
wikibase:lemma ?infinitive .

# Simple Present
OPTIONAL {
?lexeme ontolex:lexicalForm ?presFPSForm .
?presFPSForm ontolex:representation ?presFPS ;
wikibase:grammaticalFeature wd:Q3910936 ;
FILTER NOT EXISTS { ?presFPSForm wikibase:grammaticalFeature wd:Q51929074 . }
FILTER NOT EXISTS { ?presFPSForm wdt:P6191 wd:Q181970 . }
FILTER NOT EXISTS { ?presFPSForm wikibase:grammaticalFeature wd:Q126473 . }
} .

# Third-person Singular
OPTIONAL {
?lexeme ontolex:lexicalForm ?presTPSForm .
?presTPSForm ontolex:representation ?presTPS ;
wikibase:grammaticalFeature wd:Q51929074 ;
wikibase:grammaticalFeature wd:Q110786 ;
wikibase:grammaticalFeature wd:Q3910936 ;
FILTER NOT EXISTS { ?presFPSForm wdt:P6191 wd:Q181970 . }
FILTER NOT EXISTS { ?presFPSForm wikibase:grammaticalFeature wd:Q126473 . }
} .

# Simple Past
OPTIONAL {
?lexeme ontolex:lexicalForm ?simplePastForm .
?simplePastForm ontolex:representation ?simplePast ;
wikibase:grammaticalFeature wd:Q1392475 ;
?lexeme ontolex:lexicalForm ?simpPastForm .
?simpPastForm ontolex:representation ?simpPast ;
wikibase:grammaticalFeature wd:Q1392475 ;
FILTER NOT EXISTS { ?presFPSForm wdt:P6191 wd:Q181970 . }
FILTER NOT EXISTS { ?presFPSForm wikibase:grammaticalFeature wd:Q126473 . }
} .

# Past Participle
OPTIONAL {
?lexeme ontolex:lexicalForm ?pastParticipleForm .
?pastParticipleForm ontolex:representation ?pastParticiple ;
wikibase:grammaticalFeature wd:Q1230649 ;
?lexeme ontolex:lexicalForm ?pastPartForm .
?pastPartForm ontolex:representation ?pastPart ;
wikibase:grammaticalFeature wd:Q1230649 ;
FILTER NOT EXISTS { ?presFPSForm wdt:P6191 wd:Q181970 . }
FILTER NOT EXISTS { ?presFPSForm wikibase:grammaticalFeature wd:Q126473 . }
} .

SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE]".
?lemma rdfs:label ?verb .
}
}

0 comments on commit 0312232

Please sign in to comment.