MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / ja_split

Function ja_split

test/general/lm_eval/tasks/translation.py:89–97  ·  view source on GitHub ↗

Japanese splitting

(ja_text: List[str])

Source from the content-addressed store, hash-verified

87
88
89def ja_split(ja_text: List[str]) -> List[str]:
90 """Japanese splitting"""
91 if not HAS_NAGISA:
92 raise ImportError(
93 "Japanese text splitting requires the `nagisa` package. "
94 "Please install it with:\npip install nagisa"
95 )
96
97 return [" ".join(nagisa.tagging(txt.strip()).words) for txt in ja_text]
98
99
100NO_SPACE_LANG = {"zh": zh_split, "ja": ja_split}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected