(text)
| 12 | |
| 13 | # 清理不规则的文本 |
| 14 | def clean_text(text): |
| 15 | # 替换多个空格或特殊空白字符为单个空格 |
| 16 | text = re.sub(r"[\u200b\u00a0\t]+", " ", text) |
| 17 | # 替换多余的连续空格为单个空格 |
| 18 | text = re.sub(r" +", " ", text) |
| 19 | # 去除行尾空格 |
| 20 | text = re.sub(r"\s+$", "", text) |
| 21 | return text |
| 22 | |
| 23 | |
| 24 | # 在meta中插入翻译的区域化 |
no outgoing calls
no test coverage detected