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

[Conjugation] Possible reference of conjugation/tense labels via a conjugation metadata JSON file #269

Open
2 tasks done
andrewtavis opened this issue Dec 15, 2024 · 6 comments
Labels
feature New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@andrewtavis
Copy link
Member

andrewtavis commented Dec 15, 2024

Terms

Description

A question that's coming to mind right now is how Scribe-Android (and Scribe-iOS) will deal with new conjugations coming in from Scribe-Data via Scribe-Server. Scribe-Data will be getting new data as it's added to Wikidata, and this could include conjugations that have yet to be added into a Scribe keyboard app. This data would then be transferred to a Scribe keyboard application (and Scribe Conjugate applications, for that matter), but then the needed labels for what the conjugation is and which conjugation view should be used would then be unknown by the interface. This would mean that Scribe-Data would be providing new data, but the end applications would need a version update in order to reference it.

One way of handling this would be to include JSON file in the Scribe-Server response that as of now could be hard coded. This metadata file would be loaded into the application and used to define conjugation tenses:

  • What's the label of the conjugation tense - i.e. "present simple", "past perfect", etc
  • Which fields returned in a verbs response data are included in this tense
  • The UI would then be designed in a way that we would not need to hard code the conjugation logic anymore, but rather it would be loaded from the metadata file and the conjugation view would be determined by the number of conjugations in the tense

Contribution

Happy to discuss this and get feedback on the idea! Once we've decided on the functionality, we can then work to add this file and have the work in #268 be based on it :)

@andrewtavis andrewtavis added feature New feature or request help wanted Extra attention is needed question Further information is requested labels Dec 15, 2024
@andrewtavis
Copy link
Member Author

@angrezichatterbox: Would be great to get your opinion here :) Let me know if the above isn't clear! Just realized that we're going to have this problem if the data expands and then we don't have a way of remotely updating the fields.

@andrewtavis andrewtavis changed the title Possible reference of conjugations labels via a conjugation metadata JSON file [Conjugation] Possible reference of conjugations labels via a conjugation metadata JSON file Dec 15, 2024
@andrewtavis
Copy link
Member Author

CC @wkyoshida, @henrikth93, @mhmohona and @Jag-Marcel as well, as this is a major infrastructure discussion that would affect all Scribe keyboard and conjugate apps 😊

@andrewtavis andrewtavis changed the title [Conjugation] Possible reference of conjugations labels via a conjugation metadata JSON file [Conjugation] Possible reference of conjugation/tense labels via a conjugation metadata JSON file Dec 15, 2024
@angrezichatterbox
Copy link
Member

I am not sure if what I have understood is right or wrong. But we would be constructing the conjugation view based on the JSON response we would be getting from Scribe server. Am I right ?

@henrikth93
Copy link
Member

I think it would be good to discuss in a meeting maybe? It sounds good, but not sure if I grasp all of it.

@angrezichatterbox
Copy link
Member

I think it would be good to discuss in a meeting maybe? It sounds good, but not sure if I grasp all of it.

Yes, that’s true.

@andrewtavis
Copy link
Member Author

andrewtavis commented Dec 16, 2024

Yes, let's definitely discuss in the next sync! The big thing is that we might need to be explicit about which fields are in which tense. So say we get a JSON response like:

{
  "wikidata_lexeme_id": {
    "verb_tense_1_conjugation_1": "t_1_conjugation_1",
    "verb_tense_1_conjugation_2": "t_1_conjugation_2",
    "verb_tense_1_conjugation_3": "t_1_conjugation_3",
    "verb_tense_1_conjugation_4": "t_1_conjugation_4",
    "verb_tense_1_conjugation_5": "t_1_conjugation_5",
    "verb_tense_1_conjugation_6": "t_1_conjugation_6",
    "verb_tense_2_conjugation_1": "t_2_conjugation_1",
    "verb_tense_2_conjugation_2": "t_2_conjugation_2",
    "verb_tense_2_conjugation_3": "t_2_conjugation_3",
    "verb_tense_2_conjugation_4": "t_2_conjugation_4",
    "verb_tense_3_conjugation_1": "t_3_conjugation_1",
    ...
  }
}

In the above, tense 1 has six conjugations and tense 2 only has four. All of this would be loaded into an SQLite table for verb conjugations, and then till now with Scribe-iOS we hard code which conjugations go in which conjugation view in the app UI. If they change, then the hard coded categorization breaks.

What I'm saying is we provide something like this example iso2_metadata.json file:

{
  "conjugation_view_1": [
    "verb_tense_1_conjugation_1",
    "verb_tense_1_conjugation_2",
    "verb_tense_1_conjugation_3",
    "verb_tense_1_conjugation_4",
    "verb_tense_1_conjugation_5",
    "verb_tense_1_conjugation_6",
  ], 
  "conjugation_view_2": [
    "verb_tense_2_conjugation_1",
    "verb_tense_2_conjugation_2",
    "verb_tense_2_conjugation_3",
    "verb_tense_2_conjugation_4",
  ],
  ...
}

In this way we provide the data as well as a contract for how the data should be organized within the UI. In the above the first view is a 3x2 conjugation view, and the second is 2x2. If we update the queries, then we'll update the contract.

There still are some loose ends here, be we do need something like this as if the verb conjugations change and we're hard coding what's in each conjugation view, then we get a bunch of "Not in Wikidata" responses as we're looking for verb conjugation keys that are missing or renamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Status: Todo
Development

No branches or pull requests

3 participants