Method GetNearestWord
GetNearestWord(IWordDictionary, string)
public static Word GetNearestWord(this IWordDictionary dictionary, string word)
Parameters
dictionary
IWordDictionaryword
string
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
dictionary
IWordDictionaryThe dictionary to search
word
WordThe word to find
Returns
- Word
word
itself 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.