create_lexiconT_create_lexiconCreateLexiconCreateLexiconcreate_lexicon(算子)

名称

create_lexiconT_create_lexiconCreateLexiconCreateLexiconcreate_lexicon — 从单词元组创建词典。

签名

create_lexicon( : : Name, Words : LexiconHandle)

Herror T_create_lexicon(const Htuple Name, const Htuple Words, Htuple* LexiconHandle)

void CreateLexicon(const HTuple& Name, const HTuple& Words, HTuple* LexiconHandle)

void HLexicon::HLexicon(const HString& Name, const HTuple& Words)

void HLexicon::HLexicon(const char* Name, const HTuple& Words)

void HLexicon::HLexicon(const wchar_t* Name, const HTuple& Words)   ( Windows only)

void HLexicon::CreateLexicon(const HString& Name, const HTuple& Words)

void HLexicon::CreateLexicon(const char* Name, const HTuple& Words)

void HLexicon::CreateLexicon(const wchar_t* Name, const HTuple& Words)   ( Windows only)

static void HOperatorSet.CreateLexicon(HTuple name, HTuple words, out HTuple lexiconHandle)

public HLexicon(string name, HTuple words)

void HLexicon.CreateLexicon(string name, HTuple words)

def create_lexicon(name: str, words: Sequence[str]) -> HHandle

描述

create_lexiconcreate_lexiconCreateLexiconCreateLexiconCreateLexiconcreate_lexicon creates a new lexicon based on a tuple of WordsWordsWordsWordswordswords. By specifying a unique textual NameNameNameNamenamename, you can later refer to the lexicon from syntax expressions like those used, e.g., by do_ocr_word_mlpdo_ocr_word_mlpDoOcrWordMlpDoOcrWordMlpDoOcrWordMlpdo_ocr_word_mlp

Note that lexicon support in HALCON is currently not aimed at natural languages. Rather, it is intended as a post-processing step in OCR applications that only need to distinguish between a limited set of not more than a few thousand valid words, e.g., country or product names. MVTec itself does not provide any lexica.

执行信息

此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。

参数

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

Unique name for the new lexicon.

默认值: 'lex1' "lex1" "lex1" "lex1" "lex1" "lex1"

WordsWordsWordsWordswordswords (输入控制)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Word list for the new lexicon.

默认值: ['word1','word2','word3'] ["word1","word2","word3"] ["word1","word2","word3"] ["word1","word2","word3"] ["word1","word2","word3"] ["word1","word2","word3"]

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

词典的句柄。

可能的后继

do_ocr_word_mlpdo_ocr_word_mlpDoOcrWordMlpDoOcrWordMlpDoOcrWordMlpdo_ocr_word_mlp, do_ocr_word_svmdo_ocr_word_svmDoOcrWordSvmDoOcrWordSvmDoOcrWordSvmdo_ocr_word_svm

替代

import_lexiconimport_lexiconImportLexiconImportLexiconImportLexiconimport_lexicon

另见

lookup_lexiconlookup_lexiconLookupLexiconLookupLexiconLookupLexiconlookup_lexicon, suggest_lexiconsuggest_lexiconSuggestLexiconSuggestLexiconSuggestLexiconsuggest_lexicon

模块

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