suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexiconsuggest_lexicon (Operator)

Name

suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexiconsuggest_lexicon — 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)

def suggest_lexicon(lexicon_handle: HHandle, word: str) -> Tuple[str, int]

Description

suggest_lexiconsuggest_lexiconSuggestLexiconSuggestLexiconSuggestLexiconsuggest_lexicon compares WordWordWordWordwordword to all words in the lexicon and calculates the minimum number of edit operations NumCorrectionsNumCorrectionsNumCorrectionsNumCorrectionsnumCorrectionsnum_corrections required to transform WordWordWordWordwordword 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 SuggestionSuggestionSuggestionSuggestionsuggestionsuggestion. If there are multiple words with the same minimum number of corrections, only the first of those words is returned.

Execution Information

Parameters

LexiconHandleLexiconHandleLexiconHandleLexiconHandlelexiconHandlelexicon_handle (input_control)  lexicon HLexicon, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the lexicon.

WordWordWordWordwordword (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Word to be looked up.

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

SuggestionSuggestionSuggestionSuggestionsuggestionsuggestion (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Most similar word found in the lexicon.

NumCorrectionsNumCorrectionsNumCorrectionsNumCorrectionsnumCorrectionsnum_corrections (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Difference between the words in edit operations.

Alternatives

lookup_lexiconlookup_lexiconLookupLexiconLookupLexiconLookupLexiconlookup_lexicon

See also

create_lexiconcreate_lexiconCreateLexiconCreateLexiconCreateLexiconcreate_lexicon

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