Chinese splitting
(zh_text: List[str])
| 76 | |
| 77 | |
| 78 | def zh_split(zh_text: List[str]) -> List[str]: |
| 79 | """Chinese splitting""" |
| 80 | if not HAS_JIEBA: |
| 81 | raise ImportError( |
| 82 | "Chinese text splitting requires the `jieba` package. " |
| 83 | "Please install it with:\npip install jieba" |
| 84 | ) |
| 85 | |
| 86 | return [" ".join(jieba.cut(txt.strip())) for txt in zh_text] |
| 87 | |
| 88 | |
| 89 | def ja_split(ja_text: List[str]) -> List[str]: |
nothing calls this directly
no outgoing calls
no test coverage detected