Remove invisible characters.
(text: str)
| 236 | |
| 237 | |
| 238 | def remove_invisible_chars(text: str) -> str: |
| 239 | """Remove invisible characters.""" |
| 240 | text = re.sub(r'\s+', '', text) |
| 241 | text = re.sub(r'\u200b', '', text) |
| 242 | return text |
| 243 | |
| 244 | |
| 245 | @ICL_EVALUATORS.register_module() |