ios - 将语言词典添加到 iOS 自定义键盘以用于预测(暗示)文本

标签 ios keyboard ios8 prediction ios-keyboard-extension

我正在尝试创建自定义 iOS 键盘。我使用 UILexicon 类来提供 requestSupplementaryLexiconWithCompletion: 方法提供的基本词库。

但我也想将预测文本添加到键盘。

我知道,即使您全力以赴,也无法创建单词数据库。

所以,我相信没有人会用自己的键盘来完成它。必须有一个预先创建的数据库,我知道这一点。

即使我找到了这些词的数据库,我也不知道如何提供建议 基于上一个 单词。

Could any one Point me to a good and trusted Source that could provide me the results I want and give me a database of the Lexicons of English as well as Other Languages too.

Please even suggest the way to use the Database in the App.

所有回复都会很有帮助。

最佳答案

您应该查看 UITextChecker class用于实现高级自动更正。它允许基于用户输入但不了解上下文的预测建议。再加上 UILexicon将是一个相当不错的基本自动更正。

您还应该查看 this SO question

关于ios - 将语言词典添加到 iOS 自定义键盘以用于预测(暗示)文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26787635/

相关文章:

ios - Swift Firebase - 基于 UID 的项目数组

ios - 在 iOS 7 上读取视频元数据 - 始终为空

ios - Firebase 身份验证 iOS 12 无效 token

ios - 用键盘移动屏幕

ios - 使用未声明的标识符 'UIUserNotificationSettings'

iOS 7/8 系统键盘高度

iOS:ccTouchesBegan 可以包含多个触摸吗?

c# - 在 Main 中使用 Keyboard.IsKeyDown() 时出现 System.InvalidOperationException

python - 在 Python 上阅读钢琴音符

xcode - 使用 Xcode 6 和 swift 将 sqlite3 数据库与 ios8 应用程序一起使用