Code Monkey home page Code Monkey logo

Comments (9)

Julow avatar Julow commented on July 30, 2024 7

This is definitely planned but not for the next release. Autocorrect is a very hard problem and I'll focus on a simple and reproducible system that give predictable results rather than a complex and smart system that can complete sentences.
The first version of this feature won't be better than the stock one. But importing custom dictionaries might be something I'll want too.

from unexpected-keyboard.

JackDotJS avatar JackDotJS commented on July 30, 2024 2

Any updates on this?

I don't personally use auto-correct, but I find simple word suggestions to be incredibly invaluable when typing on mobile. Being able to fix minor typos on the fly with a single tap is a wonderful tool.

from unexpected-keyboard.

 avatar commented on July 30, 2024

Do you know from where to source dictionaries with an open license?

As for the Finnish language, at least the one which ships with the LineageOS stock keyboard is quite awful (lacks loads of grammatical cases and compounds).

from unexpected-keyboard.

kendfss avatar kendfss commented on July 30, 2024

Would it be feasible to use Enchant?
There are bindings for python and some other languages, but not java afaik.

from unexpected-keyboard.

ChiefMikeK avatar ChiefMikeK commented on July 30, 2024

Do you know from where to source dictionaries with an open license?

As for the Finnish language, at least the one which ships with the LineageOS stock keyboard is quite awful (lacks loads of grammatical cases and compounds).

https://github.com/voikko

from unexpected-keyboard.

Julow avatar Julow commented on July 30, 2024

Sorry, I might not have time to work on it during this year. I won't close the issue as I also want the feature but keep in mind it's not planned soon.

from unexpected-keyboard.

Ferk avatar Ferk commented on July 30, 2024

I'll focus on a simple and reproducible system that give predictable results rather than a complex and smart system that can complete sentences.

I agree with this.

As someone in a multi-language environment, one issue I have constantly with many autocorrect systems is that they actually cause typing errors when they make wrong assumptions about what language you are using and "correct" the wrong language, or otherwise force you to switch to another layout, despite both languages using largely the same alphabet. So it would be great if the system could allow combining dictionaries of words from multiple languages without having to switch layouts all the time, or at least allow for custom dictionaries so we can combine them ourselves.

from unexpected-keyboard.

redstefan1 avatar redstefan1 commented on July 30, 2024

Has any work on this been done yet?

I don't want to seem impatient, but considering that the last comment on this issue has been written almost a year ago I think it would be good to hear if anybody has put some thought into this system.

from unexpected-keyboard.

Rodrigodd avatar Rodrigodd commented on July 30, 2024

I have thought about this feature for a while, although I still don't have time to implement it, as it will be a lot of work. However, the plan I formulated is as follows:

  • Use wordfreq as a word frequency dictionary.
  • Implement the autocorrect/autocomplete using a BK-Tree (like this one) with a Damerau–Levenshtein distance, or some other metric.
  • The points above can be implemented in a CLI app for easy testing.
  • Hook up the autocorrect to the Android keyboard.

The most uncertain point is the last one; I'm not sure how easy it is to retrieve the last typed word and render the word suggestion buttons.

This feature could be extended to:

  • Use a custom metric that takes into account how common the word is (by its frequency), suggests a word if its prefix has been typed, considers the distance between letters in the current layout, etc.
  • Allow choosing which dictionaries to download: there are 39 small dictionaries, ~200KB each, totaling ~8MiB, while the app today is only 633KB. It may not be worthwhile to ship all dictionaries with the app.
  • Implement a small word prediction model to autosuggest words (though I'm not sure of a good option for this).

from unexpected-keyboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.