Method GetNearestWord
GetNearestWord(IWordDictionary, string)
public static Word GetNearestWord(this IWordDictionary dictionary, string word)
Parameters
dictionaryIWordDictionarywordstring
Returns
GetNearestWord(IWordDictionary, Word)
Finds the closest word to the given input string, by edit distance
public static Word GetNearestWord(this IWordDictionary dictionary, Word word)
Parameters
dictionaryIWordDictionaryThe dictionary to search
wordWordThe word to find
Returns
- Word
worditself if it is a valid word in the dictionary, or the word in the dictionary with the smallest edit distance to it.
Remarks
This implementation may prove slow on larger dictionaries.