(self, data)
| 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 |