汉字五笔转换模块/工具.
Project description
汉字五笔转换工具(Python 版)
将汉字转为五笔码。现只支持 86 版编码。(ps:因为找到整理出 86 版五笔编码)
关于
- GitHub: https://github.com/sfyc23/python-wubi
- License: MIT license
- PyPI: https://pypi.org/project/pywubi
- Python version: 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']
Lincese
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pywubi-0.0.2.tar.gz
(133.4 kB
view details)
Built Distribution
pywubi-0.0.2-py3-none-any.whl
(132.4 kB
view details)
File details
Details for the file pywubi-0.0.2.tar.gz
.
File metadata
- Download URL: pywubi-0.0.2.tar.gz
- Upload date:
- Size: 133.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66fffc0fdca0abe4a386ec734db65150a16525eb4ab46ffc83ea6da289e44009 |
|
MD5 | 5eb7e7348f75cac2e1950ac417ce9d0c |
|
BLAKE2b-256 | 8c49742676d7452d354d0bab9818b80776399352a127d16d89440e1905082450 |
File details
Details for the file pywubi-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pywubi-0.0.2-py3-none-any.whl
- Upload date:
- Size: 132.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a541d8540cbd144cfc0162eae39a6362a6d377331ae0437ff57d1d8850ccaf1 |
|
MD5 | 3afa5974fd496effb0e7b80bd247f0d9 |
|
BLAKE2b-256 | 336ecc5f1a5bc2fb504c9d121a13efcf41eb82fc553af33060a4908af82fcdb9 |