suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexiconsuggest_lexicon (算子)

名称

suggest_lexiconT_suggest_lexiconSuggestLexiconSuggestLexiconsuggest_lexicon — 在词典里找一个相似的词。

签名

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]

描述

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.

执行信息

参数

LexiconHandleLexiconHandleLexiconHandleLexiconHandlelexiconHandlelexicon_handle (输入控制)  lexicon HLexicon, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the lexicon.

WordWordWordWordwordword (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Word to be looked up.

默认值: 'word' "word" "word" "word" "word" "word"

SuggestionSuggestionSuggestionSuggestionsuggestionsuggestion (输出控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Most similar word found in the lexicon.

NumCorrectionsNumCorrectionsNumCorrectionsNumCorrectionsnumCorrectionsnum_corrections (输出控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Difference between the words in edit operations.

替代

lookup_lexiconlookup_lexiconLookupLexiconLookupLexiconLookupLexiconlookup_lexicon

另见

create_lexiconcreate_lexiconCreateLexiconCreateLexiconCreateLexiconcreate_lexicon

参考文献

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.

模块

光学字符识别/光学字符验证