汉字五笔转换模块/工具。
项目描述
汉字五笔转换工具(Python版)
将汉字转为五笔码。现只支持86版编码。(ps:因为整理出86版五笔编码)
关于
- GitHub:https ://github.com/sfyc23/python-wubi
- 许可证:麻省理工学院许可证
- PyPI:https ://pypi.org/project/pywubi
- Python版本:3
特性
- 将词组转成五笔编码。例如词组:生死有命。换成五笔码为:'tgdw';
- 返回汉字的所有可能的编码。如:为。换成五笔码为:'ylyi', 'yly', 'yl', 'o';
- 句子将一段,转成五笔。:天气不错,我们码去散播为吧!:五笔码:'gdi', 'rnb', 'gii', 'qajg', ',', 'trnt', 'wun ','fcu','aety','hir','kcn','!'
安装
$ pip install pywubi
使用示例
>>> from pywubi import wubi
>>> wubi('我爱你')
['trnt', 'epdc', 'wqiy']
>>> wubi('我爱你',multicode=True) # 返回汉字的所有可能的五笔编码
[['trnt', 'trn', 'q'], ['epdc', 'epd', 'ep'], ['wqiy', 'wqi', 'wq']]
>>> wubi('我爱你', single=False) # 以词组的方法处理这些汉字
['tewq']
林赛
MIT License
Copyright (c) 2019 Thunder Bouble
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
pywubi-0.0.2.tar.gz
(133.4 kB
查看哈希)
内置分布
pywubi-0.0.2-py3-none-any.whl
(132.4 kB
查看哈希)