(self, max_text_length=25, character_dict_path=None, **kwargs)
| 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'] |