问题描述
我正在使用 UserDictionary.Words 类的 addWord 函数可将单词添加到字典中,以便它们可以出现在文本预测中.单词确实存在于字典中并带有APP_ID=0
,并且可用于默认的android键盘.但是,我使用的是Swift键盘,它没有考虑将这些词用于预测".
I am using UserDictionary.Words class's addWord function to add Words to Dictionary so that they can show up in Text prediction. The Words do exist in the dictionary with APP_ID=0
and available for default android keyboard.However I am using Swift keyboard and it is not considering those words for Prediction.
我正在使用教程
UserDictionary.Words.addWord(this, "ThisIsSomeWordIwantForPrediction", 250, null, Locale.getDefault());
我的问题是如何添加单词,以便所有键盘都可以预测它们
My question is how can I add words such that they are available for prediction for all keyboards
推荐答案
您正在做正确的事情以使单词可用,但是您已经发现,并非所有的键盘都在从系统词典内容提供程序中读取内容.
You are doing the right thing to make the words available, but as you have found, not all keyboards are reading from the system dictionary content provider.
这是您需要向Swiftkey提出的问题,以了解为什么他们的键盘不使用系统提供的单词列表.
That's a question you need to address to Swiftkey, as to why their keyboard does not use the system provided word list.
(类似地,并非所有的Web浏览器应用程序都使用系统提供的书签存储,而诸如whatsapp之类的消息传递应用程序提供其自己的存储解决方案,而不是使用内置的SMS存储提供程序.)
(Similarly, not all web browser apps make use of the system provided bookmark storage, and messaging apps like whatsapp provide their own storage solution, rather than making use of the inbuilt SMS storage provider).
这篇关于问题以编程方式为单词预测添加单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!