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

User dictionary #47

Closed
5 tasks done
bbqsrc opened this issue Dec 19, 2019 · 11 comments
Closed
5 tasks done

User dictionary #47

bbqsrc opened this issue Dec 19, 2019 · 11 comments
Assignees

Comments

@bbqsrc
Copy link
Member

bbqsrc commented Dec 19, 2019

automatically maintained user dictionary:

  • unknowns left uncorrected should be placed into a "candidate list"
  • unknowns left uncorrected a second time should be stored in a "user dictionary", and suggested prior to anything else for similar input
    • The word before and after the user dictionary word should also be stored
    • Make sure the algorithm for determining which word in a user dictionary is a separate function so it can be easily modified
  • User dictionary should be visible and editable within the keyboard app
@dylanhand
Copy link
Contributor

* Make sure the algorithm for determining which user dictionary is a separate function so it can be easily modified

This implies there will be multiple user dictionaries. Can you elaborate? I had imagined it would be one dictionary per device with multiple "candidate words" and "confirmed words".

@bbqsrc
Copy link
Member Author

bbqsrc commented Feb 4, 2020

It's a typo, fixed.

@dylanhand
Copy link
Contributor

dylanhand commented Feb 11, 2020

  • add 'User Dictionary' button to hosting app UI
  • tapping 'User Dictionary" button loads a table listing all the words in the user dictionary
  • tapping a word in the 'User Dictionary' list shows the contexts in which the word was used
  • ensure results are case insensitive
  • add empty state for user dictionary
  • add UI that allows user to manually add user word to dictionary in the hosting app
  • add database flag column so we can track user-added and blacklisted words
  • remove ellipsis from word context view
  • add database column for locale that is set to the current keyboard's locale when adding a word
  • add ui for per-keyboard user dictionaries
    • new flow should be [settings] -> [user dictionary] -> [list of dictionaries by language] -> [ user dictionary] ->
  • if a user has only one keyboard installed, go directly to the user dictionary for that keyboard rather than showing a list of locales (which will contain only one item)
  • add ability to delete words in the user dictionary
  • adding first word should hide empty state and show table
  • removing last word should show empty state
  • words are displayed in alphabetical order
  • animate row insertion of word into dictionary
  • if user adds word that already exists in the db, do nothing... or, mark it as user word if not already?
  • validate manually added word -> no spaces, no empty strings, etc
  • show unique contexts in context list (or group, showing count on right)
  • add button that allows the user to submit their word dictionary so we can improve our spelling suggestions ⇒ Option to upload user dictionary #221
  • add localization plugs for all strings
  • add logic for automatically adding word candidates as the user types (this is a big one - see outline in the first comment above)
  • add UI that allows user to blacklist/unblacklist a word (in case we detected a word that was actually a typo)
  • get group id dynamically
  • add checks that disable user dictionary when full access is not granted
    • add empty state to user dictionary settings (HostingApp) that indicate the user dictionary requires full access (and link user to settings to enable if possible)
    • put guard in keyboard extension that doesn't load the user dictionary if full access is not granted
  • suggest user dictionary words in the banner
  • change back bundle identifier when done!

@snomos
Copy link
Member

snomos commented Feb 13, 2020

* Make sure the algorithm for determining which user dictionary is a separate function so it can be easily modified

This implies there will be multiple user dictionaries. Can you elaborate? I had imagined it would be one dictionary per device with multiple "candidate words" and "confirmed words".

Wouldn't it be natural to have a separate user dictionary for each language/keyboard? You don't want to get suggestions for a Sámi language when typing a completely different language. Maybe the average user don't need this, but at least make sure the code is such that it won't be much work to enable it if we find out this is what people want.

@dylanhand
Copy link
Contributor

Wouldn't it be natural to have a separate user dictionary for each language/keyboard? You don't want to get suggestions for a Sámi language when typing a completely different language. Maybe the average user don't need this, but at least make sure the code is such that it won't be much work to enable it if we find out this is what people want.

Good point. We'll make sure there is a unique dictionary per keyboard locale.

@snomos
Copy link
Member

snomos commented Feb 19, 2020

if user adds word that already exists in the db, do nothing... or, mark it as user word if not already?

What if each time the word is seen, a counter is incremented, and this can then be used to promote it as a suggestion in various contexts (both spelling error and word prediction (in the future))

@bbqsrc
Copy link
Member Author

bbqsrc commented Feb 19, 2020

That, right now, would go a bit beyond the scope of what we can reasonably do. Let's put that on the backlog to visit once we have the confined case working. Getting context at all is quite a big leap forward, so we can discuss the particular data collection in a separate issue. :D

@dylanhand
Copy link
Contributor

dylanhand commented Mar 10, 2020

Things to clean up:

  • KeyboardLocales/KeyboardLocale
  • split up UserDictionary so test methods are in an extension, better separate public/private API
  • Make classes final
  • use class for context instead of struct?
  • take another look at generic settings viewcontrollers - can it be cleaned? protocol? rows lazy so not generated at each access?
  • should CursorContext and WordContext be combined into one object?
  • update divvunspell to use named parameters in tuple for offset and word -> rabbit hole

dylanhand added a commit that referenced this issue Mar 10, 2020
@dylanhand dylanhand mentioned this issue Mar 10, 2020
dylanhand added a commit that referenced this issue Mar 10, 2020
@snomos
Copy link
Member

snomos commented Apr 10, 2020

I have installed build 155 from this night, but the user dictionary feature is nowhere to be found. I have uninstalled the previous version, restarted the phone, and ensured that full access is given to the keyboards. Could it be that the CI configuration is the one with disabled user dictionary support?

@dylanhand
Copy link
Contributor

dylanhand commented Apr 10, 2020 via email

@snomos
Copy link
Member

snomos commented Sep 18, 2023

This task is done, enhancements and fixes should go in new issues.

@snomos snomos closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants