[英]How to check whether a word is present in English Dictionary or not in Android Studio?
I am developing an Android Application, using Java.我正在使用 Java 开发 Android 应用程序。 In it, I need to check whether a word entered by the user is an English word or not?其中,我需要检查用户输入的单词是否是英文单词? I do not need the meaning, just I need to check whether it is an English word or not.我不需要意思,我只需要检查它是否是一个英文单词。 Can anyone suggest me what is the best way to achieve this?谁能建议我实现这一目标的最佳方法是什么?
You could check for Java spellcheckers rather than Android spellcheckers.您可以检查 Java 拼写检查器而不是 Android 拼写检查器。 A quick Google yields Jazzy and JOrtho .一个快速的谷歌产生Jazzy和JOrtho 。 The latter says it fits in less than 2MB in the JVM.后者表示它在 JVM 中的容量不到 2MB。
Another good library is JLanguageTool http://www.languagetool.org/usage/ It has a pretty simple api and does both spelling and grammar checking/suggestions.另一个不错的库是 JLanguageTool http://www.languagetool.org/usage/它有一个非常简单的 api,可以进行拼写和语法检查/建议。
You can download this list of 58,000 words ( http://www.mieliestronk.com/corncob_caps.txt ) and check if the word entered is in the list.您可以下载这个包含 58,000 个单词的列表 ( http://www.mieliestronk.com/corncob_caps.txt ) 并检查输入的单词是否在列表中。
Check the license of conditions to use the list in your app.检查条件许可以在您的应用程序中使用该列表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.