如何根据Windows词典检查字符串? [英] How to check a string against the Windows dictionary?

查看:89
本文介绍了如何根据Windows词典检查字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查Windows词典中是否存在某个字符串?

How can you check if a certain string is in the Windows dictionary?

或者换句话说,如何获取Windows词典的全部内容,因此您可以设置一个新字典以包含该内容?

Or, in other words, how to you grab the entirety of the Windows dictionary, so you can set a new dictionary to have that content?

推荐答案

对于Windows 8和Windows Server 2012,有一个拼写检查API ,可以是通过COM从VB.Net使用。

For Windows 8 and Windows Server 2012 there is a Spelling Checking API, that can be consumed from VB.Net via COM.

Wotsit.org ,很遗憾,该站点当前不可用(提供的链接是通过Wayback机器提供的。)

There is a link to the Microsoft Word Dictionary format (.dic file) listed on Wotsit.org, unfortunately the site is currently unavailable (the link provided is via the Wayback machine).

Microsoft提供了用于Office拼写检查的通用Speller API(CSAPI),但是我t似乎需要第三方词典。

Microsoft provide a Common Speller API (CSAPI) for Office spell checking, however it appears to require a third party dictionary.

Merriam-Webster提供在线免费提供给非商业用途的字典API

Merriam-Webster provide an online Dictionary API which is free for non-commercial use.

Microsoft Small Basic 提供了字典API 到在线服务并可以从VB.Net使用,只需导入SmallBasicLibrary.dll。

Microsoft Small Basic provides a Dictionary API which connects to an online service and can be consumed from VB.Net, simply import the SmallBasicLibrary.dll.

Imports Microsoft.SmallBasic.Library

Module MyModule

    Sub Main()
        Dim definition = Dictionary.GetDefinition("vowel")
        ' A string is returned if the word exists in the dictionary
        Console.WriteLine(CStr(definition))
    End Sub

End Module

这篇关于如何根据Windows词典检查字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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