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
Support user dictionary in suggestions #2132
base: master
Are you sure you want to change the base?
Support user dictionary in suggestions #2132
Conversation
TODO: fix bugs in Latin that (1) auto-commits, and (2) matches empty text and non-starting positions (feature or a bug?). Any suggestions on what to do with the current behavior of matching non-starting positions? e.g. when |
1485a66
to
ff8c3a9
Compare
Does it have an estimated finish date? |
Not really, this heavily interacts with the autocorrect and suggestion implementation that Patrick is working on. When that is done, this can be rewritten and become ready. |
Tbh if the user enters "mis" he/she probably didn't meant to enter "tiramisu", so it would make sense to match the beginning only. In my currently unrelased NLP core this problem has been addressed differently through proximity matching (but in your example it would not suggest "tiramisu" for "mis" as input either because it is not even close to the beginning of the word), however for the scope of the feature you implement I think it is more than enough to do exact matches on the beginning only. |
Maybe make it an option to toggle it on/off |
Update: fixed these issue and added a quick action button to add things to the internal user dictionary. |
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
…items. Match locale prefix (e.g. entries for en available for en_US subtype). Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
… dictionary item fields. Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
e8cfb77
to
760faa2
Compare
… QuickActionArrangement.contains()
val oldArrangement = QuickActionArrangement.Serializer.deserialize(entry.rawValue) | ||
val newDefault = QuickActionArrangement.Default | ||
|
||
// FIXME: what is the canonical equality for two quick actions? Using .keyData().code for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that for QuickActionArrangement setting migration, we add newly available action tiles. But the correspondence is determined by .keyData().code
, as QuickActionArrangement.contains()
seems to compare by object reference or something
This PR technically is ready to merge if I do not find any issue in the next few days. But it may be more convenient to merge after the suggestion engine is ready and after adapting this PR to that version. |
@moonbeamcelery is there any plan to take suggestions from the system user dictionary as well? |
FlorisBoard supported that before, and this PR enables that as well. I just didn't add a quick action button for it. |
This PR adds custom-defined dictionary into the suggestions for both Latin and HanShapeBased providers, and the fallback one.
This is
again based on #2054 and includes changes from #2093. For now, only the last commit is specific to this PRrebased on to master.TODO:Add default language values to the entries based on which screen the user is on.✔️ doneFix bugs in Latin that (1) auto-commits, and (2) matches empty text and non-starting positions (feature or a bug?).✔️ doneThe added quick action does not show up unless you delete the app's data and start over. Need to fix.✔️ doneUpdate: fixed these issue and added a quick action button to add things to the internal user dictionary.