suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexicon (Operator)

Name

suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexicon — Find a similar word in a lexicon.

Signature

suggest_lexicon( : : LexiconHandle, Word : Suggestion, NumCorrections)

Herror T_suggest_lexicon(const Htuple LexiconHandle, const Htuple Word, Htuple* Suggestion, Htuple* NumCorrections)

void SuggestLexicon(const HTuple& LexiconHandle, const HTuple& Word, HTuple* Suggestion, HTuple* NumCorrections)

HString HLexicon::SuggestLexicon(const HString& Word, Hlong* NumCorrections) const

HString HLexicon::SuggestLexicon(const char* Word, Hlong* NumCorrections) const

HString HLexicon::SuggestLexicon(const wchar_t* Word, Hlong* NumCorrections) const   (Windows only)

static void HOperatorSet.SuggestLexicon(HTuple lexiconHandle, HTuple word, out HTuple suggestion, out HTuple numCorrections)

string HLexicon.SuggestLexicon(string word, out int numCorrections)

Description

suggest_lexiconsuggest_lexiconSuggestLexiconSuggestLexiconSuggestLexicon compares WordWordWordWordword to all words in the lexicon and calculates the minimum number of edit operations NumCorrectionsNumCorrectionsNumCorrectionsNumCorrectionsnumCorrections required to transform WordWordWordWordword into a word from the lexicon. Valid edit operations are the insertion, deletion and replacement of characters. The most similar word found in the lexicon is returned in SuggestionSuggestionSuggestionSuggestionsuggestion. If there are multiple words with the same minimum number of corrections, only the first of those words is returned.

Execution Information

Parameters

LexiconHandleLexiconHandleLexiconHandleLexiconHandlelexiconHandle (input_control)  lexicon HLexicon, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the lexicon.

WordWordWordWordword (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Word to be looked up.

Default value: 'word' "word" "word" "word" "word"

SuggestionSuggestionSuggestionSuggestionsuggestion (output_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Most similar word found in the lexicon.

NumCorrectionsNumCorrectionsNumCorrectionsNumCorrectionsnumCorrections (output_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Difference between the words in edit operations.

Alternatives

lookup_lexiconlookup_lexiconLookupLexiconLookupLexiconLookupLexicon

See also

create_lexiconcreate_lexiconCreateLexiconCreateLexiconCreateLexicon

References

Vladimir I. Levenshtein, Binary codes capable of correcting deletions, insertions, and reversals, Doklady Akademii Nauk SSSR, 163(4):845-848, 1965 (Russian). English translation in Soviet Physics Doklady, 10(8):707-710, 1966.

Module

OCR/OCV