Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add English verbs query file #40

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going off of what we'd do with the past participle, i.e. when formatting, to simply use the past participle to construct the different conjugations for * perfect tenses..

I can't remember if we discussed the same for the present participle to construct the different conjugations for * perfect continuous, e.g. have been walking. Is that something that we do/will do? Do we need to grab the present participle as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't been doing continuous tenses until now, which is a good thought that maybe we do need this 🤔 I'd argue against present continuous, but maybe there's a use for perfect continuous :) I'm going to merge so we can play around with this a bit more, but have added a note for the weekly 😊

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 .
}
}