本文介绍了如何根据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,有一个,可以是通过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.

在,但是我t似乎需要第三方词典。

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

Merriam-Webster提供在线。

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

提供了到在线服务并可以从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词典检查字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 18:46