Kamaros / ELDeveloperKeyboard

An iOS custom keyboard extension written in Swift designed to make it much, much easier to type code on an iOS device.
Apache License 2.0
80 stars 21 forks source link

predictive doesn't work #16

Open gstream opened 7 years ago

gstream commented 7 years ago

any idea ?

Kamaros commented 7 years ago

Probably because I never got around to implementing proper prediction? An easy naive implementation would be to add and remove words from the LanguageProvider trie as you use them, and adjust weights based on frequency.

gstream commented 7 years ago

thanks for your answer. what is the best solution to implement predictive feature on custom iOS keyboard extension, do you think ?

Kamaros commented 7 years ago

Depends on what your goal is. When I built this keyboard as an exercise to learn Swift, it was designed for code, where you tend to not reuse variable names much between files and projects, so something like that naive implementation make sense (since you don't have much training data). For normal English text prediction, I'd recommend either a traditional neural network trained on n-grams, or a recursive neural network.

gstream commented 7 years ago

thank you