Auto Correct for Text Editor

23 views
Skip to first unread message

Wolf Vollprecht

unread,
Sep 25, 2014, 5:20:44 AM9/25/14
to poio-d...@googlegroups.com
Hi,

I am currently working on an automatic type (and spell) correction plugin for my text editor called UberWriter (https://github.com/wolfv/uberwriter). It's a Markdown editor.

The idea is to replicate something ála OS X or Android spell correction.

I am wondering if there are some ideas how pressagio could be used or extended for this?

I have several ideas at the moment:

- Calculate a score based on levenshtein distance
- Modify the score based on key distance on the current keyboard layout
- And modify the score based on bi- and trigram frequencies

Also I think it's quite tedious to build the ngram database myself, so I am looking into importing a word frequency database from AnySoftKeyboard.

The biggest problem I have right now with presage and pressagio is that it's not possible to do a "fuzzy" search (or at least it doesn't seem so).

E.g. if I want to type "something" I would (in the right context) get the correct suggestion probably after typing "so". But if I hit the second key wrong "sp" then I would never get that suggestion.

I am wondering if there are any ideas how to implement something like that? I would also like to contribute it back to pressagio if thats desired.

Cheers,

Wolf


pbouda

unread,
Sep 29, 2014, 9:36:36 AM9/29/14
to poio-d...@googlegroups.com
Hi Wolf,

yes, you are right, presage and hunspell are more for predictive text, not so much for auto-/spelling-correction. As far as I know hunspell should support the latter. Or indeed, some kind of fuzzy search could be added to presage/pressagio. I remember that the maliit keyboard (on MeeGo, Nemo) used a combination of presage and hunspell to provide text input on mobile phones, you might check the plugins:

https://github.com/maliit/plugins

Maybe for a little inspiration... I don't know a lot about hunspell, but I can help as far as possible if you want to give it a try in presage/pressagio.

Best,
Peter

Wolf Vollprecht

unread,
Sep 29, 2014, 10:17:42 AM9/29/14
to poio-d...@googlegroups.com
Hi Peter,

thanks for your response. I had discovered Maliit as well, but it's actually a great suggestion to look at their way of doing things (I just got frustrated with using their prediction engine because the project was hard to build on my machine for some reason).

I think using pressagio and hunspell my result should be quite similar.

Cheers,

Wolf

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "poio-discuss" abonniert haben.
Wenn Sie sich von diesem Thema abmelden möchten, rufen Sie https://groups.google.com/d/topic/poio-discuss/FeWRWhU4YUc/unsubscribe auf.
Wenn Sie sich von dieser Gruppe und allen Themen dieser Gruppe abmelden möchten, senden Sie eine E-Mail an poio-discuss...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages