cjk-textwrap
是Python 3.6textwrap
模块的中日韩字符兼容版本。此外,它提供了灵活的接口以便用户自定义分词器(如结巴分词)。
cjk-textwrap
is a CJK characters compatible version of Python 3.6's textwrap
module. Moreover, it provides flexible interfaces which allows users to define their own text segmentation for text wrapping like jieba.
pip:
pip install cjk-textwrap
poetry:
poetry add cjk-textwrap
Although user can get various language support by adding their custom splitter, cjk-textwrap
provides built-in English-Chinese
mixed text phrase wrapping support.
虽然可以通过自定义分词器添加各种语言的支持,但是cjk-textwrap
提供了原生的中-英文混合句支持。
- Chinese Support 中文支持
- Japanese Support 日文支持
- Korean Support 韩文支持
This project is licensed under MIT.