Table of Contents

Method GetNearestWord

Namespace
Gamelogic.Words
Assembly
Gamelogic.Words.dll

GetNearestWord(IWordDictionary, string)

public static Word GetNearestWord(this IWordDictionary dictionary, string word)

Parameters

dictionary IWordDictionary
word string

Returns

Word

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 IWordDictionary

The dictionary to search

word Word

The 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.