一个使用一组中文标记器的简单迭代器
tokenizers-collection的Python项目详细描述
中文分词器集合
一些中文分词器的简单封装和集合
- Free software: MIT license
- Documentation: https://chinese-tokenzier-iterator.readthedocs.io.
Features
- TODO
使用
fromtokenizers_collection.configimporttokenizer_registryforname,tokenizerintokenizer_registry:print("Tokenizer: {}".format(name))tokenizer('input_file.txt','output_file.txt')
安装
pip install tokenizers_collection
更新许可文件与下载模型
因为其中有些模型需要更新许可文件(比如:pynlpir)或者需要下载模型文件(比如:pyltp),因此安装后需要执行特定的命令完成操作,这里已经将所有的操作封装成了一个函数,只需要执行类似如下的指令即可
python -m tokenizers_collection.helper
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2018-08-28)
- First release on PyPI.