Silverlight 拼写检查器
我需要允许对 Silverlight 应用程序中的某些文本框进行拼写检查。
我正在寻找服务器端解决方案。我所说的服务器端是指字典不驻留在客户端。
我有 Telerik RadControls for Silverlight,它有 RadSpellChecker 和支持拼写检查的 RadRichTextBox,但据我所知必须在 XAP 文件中包含 3mb+ 字典,并且 xap 的大小是一个问题。
建议?
I have a requirement to allow spell checking for some textboxes in a Silverlight application.
I'm looking for a server-side solution. By server-side I mean that the dictionary doesn't reside on the client.
I have Telerik RadControls for Silverlight, which has the RadSpellChecker and the RadRichTextBox which supports spell checking, but as far as I know have to include the 3mb+ dictionary in the XAP file and the size of the xap is a concern.
Suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 Telerik 的 RadSpellChecker,您不仅限于使用内置的拼写检查器和词典,因此您的场景非常合理。您可以通过多种方式在服务器上使用此控件的功能。一种方法是创建一个服务,实现 Telerik.Windows.Documents.Proofing.ISpellChecker 接口,其中包含一个返回单词列表(建议)的方法。据我所知,这将是解决您的问题的最佳方法。
另一种解决方案是在应用程序加载后异步下载字典(顺便说一句,压缩后为 900KB),然后启用拼写检查。
您能做的最好的事情就是访问一些 Telerik 论坛或联系 Telerik 支持团队,我相信他们会为您提供他们能想到的最佳解决方案。
With Telerik's RadSpellChecker, you are not limited to use only the built-in spellchecker and dictionaries, so your scenario is pretty plausible. There are several ways you can use the functionality of this control on the server. One approach would be to create a service, implementing the interface Telerik.Windows.Documents.Proofing.ISpellChecker, which contains a method that returns a list of words (suggestions). As far as I know, this would be the best way to handle the problem in your case.
Another solution would be to download the dictionary asynchronously (which by the way is 900KB when zipped) after the application has loaded and after that enable spellchecking.
The best you can do is to visit some of the Telerik forums or contact the Telerik support team, who I am sure, will provide you with the best solution they can think of.
我知道有许多供应商提供用于拼写检查的 Web 服务调用,我看过一些,但从未深入研究 API。我相信它们中的大多数都是标准的 wsdl 类型的 Web 服务。你用谷歌搜索过吗?
我发现有趣的是,Telerik 词典是如此之大,当手机第一次有了拼写检查器/预测文本时,你可以将大多数最常见的英语单词放入不到 1/2 Mb 的空间中,你确定它们没有选项吗围绕字典的子集等
I know there are a number of vendors that provides webservice calls for spell checking, I've looked at a few but never went far enough to investigate the APIs. I believe most of them are standard wsdl type webservices. Have you googled it?
I find it interesting that the Telerik dictionary is so big, when cellphones first got spell checkers / predictive text you could fit most of the most common English words in to less than 1/2 a Mb, are you sure they don't have options around subsets of dictionaries etc
如果您更喜欢使用 Google API 在客户端进行拼写检查,请查看 Silverlight 的 SpellLight 库。与谷歌沟通需要更高的信任度。
If you prefer to do the spell checking on client side utilizing Google API, checkout SpellLight library for Silverlight. It requires elevated trust to work though to communicate with Google.