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

Investigate local autocorrect / autocompletion algorithms #44

Open
dessalines opened this issue Mar 19, 2023 · 24 comments
Open

Investigate local autocorrect / autocompletion algorithms #44

dessalines opened this issue Mar 19, 2023 · 24 comments

Comments

@dessalines
Copy link
Owner

dessalines commented Mar 19, 2023

A few for java:

Dictionaries:

@Zireael07
Copy link

Speaking of, I find that it autocorrects i to I, which is annoying when I happen NOT to be writing in English...

@dessalines
Copy link
Owner Author

Currently that's part of auto-capitalize, but I agree, it should be removed as its correct only for english.

@dessalines dessalines changed the title Investigate local autocorrect algorithms Investigate local autocorrect / autocompletion algorithms Apr 14, 2023
@DeflateAwning
Copy link

This would be great!

@racuna
Copy link
Contributor

racuna commented May 23, 2023

IIRC MultilingO stores couples of words locally and then a number of occurrences to build a pseudo-smart word prediction: e.g. "I want a beer".

I:want:1
want:a:1
a:beer:1

"I want to walk"


I:want:2
want:to:1
to:walk:1

So, the keyboard could suggest "want" after the user writes "I", then, if the user accepts: "want", the keyboard could suggest "a" or "to" because they both have the same "weight" of 1.

@DeflateAwning
Copy link

That seems like a really effective way to store and query this info, and could provide huge value at little complexity.

@racuna
Copy link
Contributor

racuna commented May 23, 2023

And can be backed up in plain text

@DeflateAwning
Copy link

Ideally, we'd provide an encrypted backup option too. I wouldn't want my typing history stored in plain text, I don't think

@racuna
Copy link
Contributor

racuna commented May 23, 2023

yeah, of course. I meant about having it backed up locally and "editable"

@cyxae
Copy link

cyxae commented Jun 12, 2023

The AOSP keyboard https://android.googlesource.com/platform/packages/inputmethods/LatinIME/ has a nice autocorrection/autosuggestion feature, that may be another option to consider ;)

@uniquePWD
Copy link

I wanted to revive this conversation by introsucing a repository. https://github.com/fengjian0106/Minuum-Fleksy-Fuzzy-Matching

Could this be helpfull? I think, maybe so

@Geobert
Copy link

Geobert commented Feb 5, 2024

That’s the reason I gave up on MessagEase in the first place. With open source alternative, my hope of using this kind of keyboard is back alive :D

@breversa
Copy link
Contributor

breversa commented Feb 6, 2024

Agreed! :-)
Not having autocorrect/autocompletion is the number 1 reason why I haven’t switched full-time to Thumk-Key. :-|

@Hate9
Copy link
Contributor

Hate9 commented Apr 25, 2024

@pwd-github probably not? I'm pretty sure the main benefits of what minuum does rely pretty heavily on a keyboard where the only input is tapping. could be relevant though, and it's certainly an interesting resource.

@Hate9
Copy link
Contributor

Hate9 commented Apr 26, 2024 via email

@seguri
Copy link

seguri commented Jun 29, 2024

hey everyone!

I've just finished adding autocompletion to my fork. It's more of a PoC rather than a full product, but it shows what can be done (and it's fully working) :) I've spent no time tweaking the graphical appearance of the buttons. Right now I'm using a custom dictionary defined with some Italian words. An example:

image

@dessalines
Copy link
Owner Author

Nice!

It'd be a good idea to show the suggestions above the keyboard, like a lot of the other ones do.

I did some searching around, and unfortunately it doesn't look like android gives access to anything but the user dictionary: https://developer.android.com/reference/android/provider/UserDictionary.html

So we might have to think about the best ways to either import or bundle dictionaries into thumb-key.

@Hate9
Copy link
Contributor

Hate9 commented Jun 30, 2024

I think on-the-side makes a lot of sense for a lot of use-cases, but I think we should probably have it be a settings toggle. For a lot of phones, you won't be using that space anyway so it's a great option, but for (for instance) mine, that space is smaller or otherwise needed (to say nothing of the two-hands layouts).

@Hex5DA
Copy link

Hex5DA commented Jun 30, 2024

some ideas i had a while back, maybe a bit overreaching for this discussion. if they're irrelevant lmk.

  • the middle button in the 3x3 (or the spacebar?) autocompletes the next predicted word
  • the angle which a swipe needs to land in to type a character grows/shrinks if that character is more/less likely to be the next character
  • the list of contender words for autocompletion is shown to the side of the keyboard (not above)

@racuna
Copy link
Contributor

racuna commented Jul 1, 2024

So we might have to think about the best ways to either import or bundle dictionaries into thumb-key.

Hi, there's a OSS project with dictionaries: GNU Aspell

https://ftp.gnu.org/gnu/aspell/dict/0index.html

@dessalines
Copy link
Owner Author

Once @seguri has their PR ready to look at, we can try to integrate that in some way.

@seguri
Copy link

seguri commented Jul 2, 2024

What features should my fork integrate to consider it a sufficiently valid PR?
The purpose of my fork was primarily to tackle something I had never done before: passing data around with idiomatic Android data structures and building a simple autocomplete engine. I consider it complete for developers who can take my fork and write their own dictionary to get autocompletion.
I fear that getting my code PR-ready might require lots of time (80% of the time to complete the last 20% of the work, as per the pareto principle).

@dessalines
Copy link
Owner Author

Start the PR and mark it as draft and we can go over what else it needs.

@jm355
Copy link
Contributor

jm355 commented Aug 19, 2024

One thing that might be good is a gesture to select the suggestion. If three suggestions get displayed, you could use the top row of gestures in the top left square, where the top left corner selects the leftmost suggestion, top middle selects the middle suggestion, and top right corner selects rightmost suggestion

@Atemu
Copy link

Atemu commented Nov 8, 2024

Perhaps gestures could be used to select different forms of the same word such as tenses or cases. E.g. typing brea would offer "break" and swiping e.g. right would produce "breaking", up "broke" etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests