Hunspell on Android
Asked Answered
P

3

12

Does anyone successfully implemented Hunspell spell-checker on Android platform? Is it even possible? Did you try it? What about the results?

Thank you in advance.

Puffball answered 1/2, 2011 at 16:11 Comment(0)
E
6

I created a working prototype implementation of SpellCheckerService using Hunspell so it is possible! You can find it on GitHub HunspellCheckerService. Note that this is quick&dirty prototype.

Unfortunately from what I can see the suggestions generation in Hunspell is quite slow. Depending on the word length it takes between 0.5 and 5 seconds on my Samsung Galaxy S. On the other hand checking if the word is correctly spelled is fast enough.

The problem is that by default Android is generating suggestions lists for all misspelled words upfront rather than when the user clicks the word. This may make your smartphone burning if you edit a long text with loads of misspelled words (e.g. code sample).

Let me know if you have any questions regarding this prototype.

Endpaper answered 21/5, 2012 at 22:10 Comment(0)
P
4

There are few of the below steps you may have to follow to atleast try to port

  1. Try to run the unix form or windows form of application which comes along with the source code.
  2. Before porting you need to find out the interface layer of the Hunspell, so for that you can take help of Chromium platform where this is already part of it - to Achieve that,

Chromium code browse http://google.com/codesearch#OAMlx_jo-ck/src/third_party/hunspell/src/hunspell/hunspell.cxx

git repository for chromium http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=summary 3. Please browse through and find ou the interface. 4. Now you need to create the .so from Hunspell lib, then creat Java Native interface to expose the API's of Hunspell.

Write a desired app...

Best Regards Vinod

Paeon answered 28/9, 2011 at 4:21 Comment(1)
@Puffball hi, are you able to implement HunSpell spell checker? if so, can you plz share it here? thanks..Hamulus
R
3

Do you really need Hunspell? You might want to consider using the built-in spellchecker on Android.

(Android 4.0+)

SpellCheckerService
SpellCheckerSession

Recency answered 21/5, 2012 at 14:22 Comment(1)
That is an abstract class. You still have to implement a method for deciding if a word is correct and how to generate corrections. For analytical languages it's not bad, but for languages with more complex morphology you end up being too a lot of complex coding of you don't use a system designed for that like hunspell isMarucci

© 2022 - 2024 — McMap. All rights reserved.