-
Notifications
You must be signed in to change notification settings - Fork 66
Implement Conjugation view and insertion on click of the labels #391
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
base: main
Are you sure you want to change the base?
Implement Conjugation view and insertion on click of the labels #391
Conversation
Thank you for the pull request! ❤️The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) |
Will get to this later this evening, @angrezichatterbox 💙 |
I am not sure if I have missed anything. Happy to know any further refinement in codebase as well the overall implementation. Continuing the discussion from #268. Currently I feel that the English conjugate labels might have a lot of repeating values when in the 3x2. |
So do you think that we should do what's in iOS now and switch the contract for English verbs to just get a restricted amount of data? |
I am not sure about it. If the data makes sense even if it is repeating then it would be fine but else Happy to switch to the iOS style of things. |
I'd say maybe the best thing would be to keep it simple as we did in iOS, which has been confirmed with a bit of third party checks :) Specifically the way that iOS is set up is for higher levels of language learning, whereas the full 3x2 for all tenses is more something that just A1 English learners would need. If we're keeping it the way it is in iOS, then we need a new form for the English verbs contract as English verbs for iOS is the only interface that makes use of sub selections as we're consistently listing the 3rd person singular form and the general form, and then the user selects which one they want from the next field. I'd say the new contract would be this, but please let me know what your feedback is 😊 {
"conjugations": {
"1": {
"title": "Present",
"1": {
"title": "Pr. Simple",
"Simple": {
"I/you/plural":"simplePresent",
"he/she/it":"simplePresentThirdPersonSingular"
}
},
"2": {
"title": "Pr. Perfect",
"Perfect": {
"I/you/plural":"have englishPastParticiple",
"he/she/it":"has englishPastParticiple"
}
},
"3": {
"title": "Pr. Continuous",
"Continuous": {
"participle": "combinedPresentParticiple",
"you/plural": "are combinedPresentParticiple",
"I": "am combinedPresentParticiple",
"he/she/it": "is combinedPresentParticiple"
}
},
"4": {
"title": "Pr. Perf. Continuous",
"Perfect Continuous": {
"I/you/plural": "have been combinedPresentParticiple",
"he/she/it": "has been combinedPresentParticiple"
}
}
},
"2": {
"title": "Past",
"1": {"Simple": "simplePast"},
"2": {"Perfect": "had "},
"3": {
"title": "Past Continuous",
"Continuous": {
"Participle": "combinedPresentParticiple",
"I/he/she/it": "was combinedPresentParticiple",
"you/plural": "were combinedPresentParticiple"
}
},
"4": {"Perfect Continuous": "had been combinedPresentParticiple"}
},
"3": {
"title": "Future",
"1": {"Simple": "will infinitive"},
"2": {"Perfect": "will have englishPastParticiple"},
"3": {"Continuous": "will be combinedPresentParticiple"},
"4": {"Perfect Continuous": "will have been combinedPresentParticiple"}
},
"4": {
"title": "Conditional",
"1": {"Simple": "would infinitive"},
"2": {"Perfect": "would have englishPastParticiple"},
"3": {"Continuous": "would be combinedPresentParticiple"},
"4": {"Perfect Continuous": "would have been combinedPresentParticiple"}
}
}
} The secondary titles would be used as the header within the sub-conjugation tables. I don't think contractually getting words like "will", "would", etc makes sense as that's a lot of processing for something that we can just include in the contract 🤔 Let me know what you think, and thanks for all the questions here! :) :) |
Sound Good. I would make the changes and update the PR accordingly. This would mean that we would be using a different system entirely for English if I assume right. Would such a system be used for any other languages as the project would continue ? I would have to modify the contract extraction a bit. Should I hardcode it for English language and the subsequent workflow for only English or should I attempt to make it work for all cases. |
I'd make it work for all cases if you can :) Specifically as well, this way of going through the conjugation menus is how it works for pronoun declension views for German and Russian. This data is hard coded as we're not getting it from Wikidata (not enough to not just hard code it), but maybe the way that we move through the menus could be reused, and for this we could also make a "declension contract" with all the values hard coded and the resulting button labels just coming from the values of the contract directly rather than being read into a table? By declension btw I'm talking the work for #276 :) In German if you say "for me" or "with me", then "me" is different because it's a different case for "for" and "with". Same with "for the" and "with the", and this is multiplied for all of the various versions of "the" for the genders. The table for this works the exact same as English verbs, where we just select one option and others are shown after. As far as other verbs from other languages, I'd be amazed if we didn't need to do this again. There certainly are going to be some languages that have very simple verb conjugation, but maybe one form that's a bit weird, so we could use this in this case :) |
It makes sense to make all languages follow the same workflow then. I would work on it and make an updated PR soon :) |
To maintain simplicity. Would it make sense to make all the contracts of the same format. By this I mean that the English would be considered as a base and other language would have similar formats. I am not sure if this has any disadvantages. I would share an example below.
"conjugations": {
"1": {
"title": "Präsens",
"1": { "ich": "indicativePresentFirstPersonSingular" },
"2": { "du": "indicativePresentSecondPersonSingular" },
"3": { "er/sie/es": "indicativePresentThirdPersonSingular" },
"4": { "wir": "indicativePresentFirstPersonPlural" },
"5": { "ihr": "indicativePresentSecondPersonPlural" },
"6": { "sie/Sie": "indicativePresentThirdPersonPlural" }
},
"2": {
"title": "Preterite",
"1": { "ich": "indicativePreteriteFirstPersonSingular" },
"2": { "du": "indicativePreteriteFirstPersonPlural" },
"3": { "er/sie/es": "indicativePreteriteSecondPersonSingular" },
"4": { "wir": "indicativePreteriteSecondPersonPlural" },
"5": { "ihr": "indicativePreteriteThirdPersonSingular" },
"6": { "sie/Sie": "indicativePreteriteThirdPersonPlural" }
},
"3": {
"title": "Perfekt",
"1": { "ich": "[auxiliaryVerb] pastParticiple" },
"2": { "du": "[auxiliaryVerb] pastParticiple" },
"3": { "er/sie/es": "[auxiliaryVerb] pastParticiple" },
"4": { "wir": "[auxiliaryVerb] pastParticiple" },
"5": { "ihr": "[auxiliaryVerb] pastParticiple" },
"6": { "sie/Sie": "[auxiliaryVerb] pastParticiple" }
}
}
"conjugations": {
"1": {
"title": "Präsens",
"1": {
"title": "Präsens",
"Simple": {
"ich": "indicativePresentFirstPersonSingular",
"du": "indicativePresentSecondPersonSingular",
"er/sie/es": "indicativePresentThirdPersonSingular",
"wir": "indicativePresentFirstPersonPlural",
"ihr": "indicativePresentSecondPersonPlural",
"sie/Sie": "indicativePresentThirdPersonPlural"
}
}
},
"2": {
"title": "Preterite",
"1": {
"title": "Preterite",
"Simple": {
"ich": "indicativePreteriteFirstPersonSingular",
"du": "indicativePreteriteFirstPersonPlural",
"er/sie/es": "indicativePreteriteSecondPersonSingular",
"wir": "indicativePreteriteSecondPersonPlural",
"ihr": "indicativePreteriteThirdPersonSingular",
"sie/Sie": "indicativePreteriteThirdPersonPlural"
}
}
},
"3": {
"title": "Perfekt",
"1": {
"title": "Perfekt",
"Perfect": {
"ich": "[auxiliaryVerb] pastParticiple",
"du": "[auxiliaryVerb] pastParticiple",
"er/sie/es": "[auxiliaryVerb] pastParticiple",
"wir": "[auxiliaryVerb] pastParticiple",
"ihr": "[auxiliaryVerb] pastParticiple",
"sie/Sie": "[auxiliaryVerb] pastParticiple"
}
}
}
}
My idea would be to make use to the title and the nested json length to have a workflow universally for all so that even if data gets added on later on we would be able to not do a lot of code changes. |
If the above wouldn't make sense for a lot of languages. I would have 2 data formats that could be used for data-contracts and we could exchange or fall back between the 2 type of contracts to act accordingly. |
Might make sense to have it work in both ways? I'm thinking in terms of Scribe-Conjugate right now as well where for that app we likely would be doing a Open to your thoughts here though! |
So should I make the current implementation exist. Have a check if the data contract extraction based on the current implementation fails for any language and use the second implementation I would be doing now. My only suggestion wouldn't it be better to have a single data-contract extraction method and then follow it throughout. and modify the data extraction from the extracted contract for the apps a little differently. Would love to hear your thoughts 😄 |
Yes sorry, this makes sense. The conjugate apps could also use the contracts with the sub-view method and we just wouldn't use sub-views :) Let's plan on making all the contracts have the sub views as you mentioned here! Appreciate your suggestions! 😊 |
So the final decision is to modify the existing contract conjugation parts and accordingly modify the data classes for the overall contract and unify the extraction process right for all languages. Happy to make some initial changes to the contracts and push it here so that you can check it out and make further changes. |
Yes I'd say that makes the most sense :) Thanks, @angrezichatterbox! |
There is no combinedPastParticiple column in the database right how would be handle it. |
Also I did try to get the contract done but I am facing some difficulties in understanding on how the structure should be formatted. Could I get some more example of other languages. |
The data from Scribe-Android is likely outdated. We can shift over the data soon, but for the time being do you want to use |
Maybe we can do a call to check this sometime this weekend? I could do a call on Thursday as it's a holiday here, or Friday earlier :) Generally what I was expecting is that we'll do the nested structure for all of them, so each would be like your example above: "1": {
"title": "Präsens",
"1": {
"title": "Präsens",
... This for all of the data contracts :) Is there a specific language where you're not sure how it should work? |
Okay temporary I would use the past-participle instead of using combinedPastParticiple |
I would try to do it by tonight and ask queries if I have any |
9281137
to
60c380c
Compare
I have updated the contracts for all languages except Swedish as I am not sure of how to deal it in the case of Swedish yet. I would love to have some help on it. |
60c380c
to
25ef439
Compare
Sorry for the wait on the reply here, @angrezichatterbox! So looking at the current Swedish verbs contract, it looks like I didn't include the pronouns. We just have active and passive tenses for Swedish, which each of those just having a few forms for present, preterite past and supine. Filling in the pronouns, it looks like it would be: "conjugations": {
"1": {
"title": "Aktiv",
"1": { "imperativ": "imperative" },
"2": { "presens": "activePresent" },
"3": { "dåtid": "activePreterite" },
"4": { "liggande": "activeSupine" }
},
"2": {
"title": "Passiv",
"1": { "infinitiv": "passiveInfinitive" },
"2": { "presens": "passivePresent" },
"3": { "liggande": "passivePreterite" },
"4": { "liggande": "passiveSupine" }
}
} For active we don't do the infinitive as it's just the verb. There are other conjugations that we can add in later :) From there we'd have the extra layer of the object as you've been doing for the others 😊 Let me know if there's anything else I can do to support here! :) |
Okay I would make it like that. Would a similar structure to this makes sense for English as well. "conjugations": {
"1": {
"title": "Präsens",
"conjugationTypes": {
"1": {
"title": "Präsens",
"conjugationForms": {
"ich": "indicativePresentFirstPersonSingular",
"du": "indicativePresentSecondPersonSingular",
"er/sie/es": "indicativePresentThirdPersonSingular",
"wir": "indicativePresentFirstPersonPlural",
"ihr": "indicativePresentSecondPersonPlural",
"sie/Sie": "indicativePresentThirdPersonPlural"
}
}
}
},
"2": {
"title": "Preterite",
"conjugationTypes": {
"1": {
"title": "Preterite",
"conjugationForms": {
"ich": "indicativePreteriteFirstPersonSingular",
"du": "indicativePreteriteFirstPersonPlural",
"er/sie/es": "indicativePreteriteSecondPersonSingular",
"wir": "indicativePreteriteSecondPersonPlural",
"ihr": "indicativePreteriteThirdPersonSingular",
"sie/Sie": "indicativePreteriteThirdPersonPlural"
}
}
}
},
"3": {
"title": "Perfekt",
"conjugationTypes": {
"1": {
"title": "Perfekt",
"conjugationForms": {
"ich": "[indicativePresentFirstPersonSingular auxiliaryVerb] pastParticiple",
"du": "[indicativePresentSecondPersonSingular auxiliaryVerb] pastParticiple",
"er/sie/es": "[indicativePresentThirdPersonSingular auxiliaryVerb] pastParticiple",
"wir": "[indicativePresentFirstPersonPlural auxiliaryVerb] pastParticiple",
"ihr": "[indicativePresentSecondPersonPlural auxiliaryVerb] pastParticiple",
"sie/Sie": "[indicativePresentThirdPersonPlural auxiliaryVerb] pastParticiple"
}
}
}
}
} My idea would be to use the length of the number conjugationTypes to decide the conjugation table to be used. |
100% the number of connotations should determine the table :) Mot sure how much more it matches aside from that, but it'll make it much easier if the conjugation count determines the table 😊 |
Contributor checklist
./gradlew lintKotlin detekt test
command as directed in the testing section of the contributing guideDescription
The PR implements the switching of the conjugation views and insertion on the click of the conjugate views.
Related issue