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

Method __call__

openrec/preprocess/ce_label_encode.py:106–113  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

104 use_space_char)
105
106 def __call__(self, data):
107 text = data['label']
108 text = self.encode(text)
109 if text is None:
110 return None
111 data['length'] = np.array(len(text))
112 data['label'] = np.array(text)
113 return data
114
115 def add_special_char(self, dict_character):
116 return dict_character

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected