哪种算法正在Android的拼写检查器使用? [英] Which algorithm is being used in Android's spell checker?

查看:212
本文介绍了哪种算法正在Android的拼写检查器使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的字符串匹配算法的一些研究。其中最有用的,我碰到的是我的一个手机应用(上SE XPERIA新的Andr​​oid 2.3.4 V)。

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).

正如看到的截图,我pressed字符 jiw 这是附近那些我想要的,它正确建议。

As seen in the screenshot, I pressed the characters jiw which are near the ones I wanted and it suggested correctly.

这似乎是算法类似于莱文施泰因距离。不知怎的,在不久的字符有部分值的字符串匹配。

It seems like the algorithm is similar to levenstein distance (distance between my input and the dictionary). Somehow the near characters have some value in the string-matching.

有关算法任何想法正在使用?

Any idea about the algorithm being used?

推荐答案

我把 Android源$ C $Ç并找了拼写检查。我发现这个目录中,这似乎包含您正在寻找的来源:

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/

文件拼写检查/ AndroidSpellCheckerService.java 看起来像一个做所有繁重的工作,但 Suggest.java 还似乎涉及以某种方式

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.

这篇关于哪种算法正在Android的拼写检查器使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆