Which algorithm is being used in Android's spell checker?

前端 未结 2 1223
抹茶落季
抹茶落季 2021-02-05 18:58

I am doing some research on string matching algorithms. One of the most usable I came across is the one my cellphone uses (android 2.3.4 on SE xPeria neo v).

相关标签:
2条回答
  • 2021-02-05 19:15

    This excellent information retrieval book has a detailed section on Levenstein distance, including weighted variations. The weights could then be taken to be the distance between keys on your keypad.

    0 讨论(0)
  • 2021-02-05 19:40

    I pulled the Android source code and looked for spell checking. I found this directory which seems to contain the sources you are looking for:

    packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
    

    The file spellcheck/AndroidSpellCheckerService.java looks like the one doing all the heavy work, but Suggest.java also seems to be involved in some way.

    0 讨论(0)
提交回复
热议问题