MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / __init__

Method __init__

openrec/preprocess/dptr_label_encode.py:135–140  ·  view source on GitHub ↗
(self, max_text_length=25, character_dict_path=None, **kwargs)

Source from the content-addressed store, hash-verified

133 """Convert between text-label and text-index."""
134
135 def __init__(self, max_text_length=25, character_dict_path=None, **kwargs):
136 self.max_length = max_text_length
137 charset = get_alpha(character_dict_path)
138 charset = ''.join(charset)
139 # print(charset)
140 super(DPTRLabelEncode, self).__init__(charset)
141
142 def __call__(self, data, normalize_unicode=True):
143 text = data['label']

Callers

nothing calls this directly

Calls 2

get_alphaFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected