提供访问多个Unicode数据实例的API
项目描述
Munidata
munidata 是一个用于访问多个Unicode数据实例的API。
munidata 当前版本是在 picu 模块之上的一个简单抽象层。
致谢
此工具集由 Viagenie (Audric Schiltknecht, David Drouin 和 Marc Blanchet) 和 Wil Tan 在 ICANN 合同下实施。
许可证
版权(c)2015-2016 互联网名称与数字地址分配机构(“ICANN”)。保留所有权利。
以下条件满足的情况下,允许重新分配和使用源代码和二进制代码,无论是否修改:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the ICANN nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
本软件由ICANN及贡献者提供,“现状”提供,并明确或暗示地放弃了任何保证,包括但不限于对适销性和特定用途适用性的暗示保证。在任何情况下,ICANN或贡献者均不对任何直接、间接、偶然、特殊、示范性或后果性损害(包括但不限于替代商品或服务的采购;使用、数据或利润的损失;或业务中断)承担责任,无论损害产生的原因和责任理论如何,即使已告知可能发生此类损害。
先决条件
- Python(2.7或>=3.4)
- picu [MIT/X许可证]
设置
如果您的发行版未打包所需的依赖项,最快的方法是使用Python的虚拟环境。
-
创建Python虚拟环境
$ virtualenv venv
-
激活环境
$ source ./venv/bin/activate
-
下载依赖项
$ (venv) pip install -r requirements.txt
-
安装一些版本的ICU库
使用
获取多个ICU版本的代码点的通用类别
$ python test_munidata.py --libs /usr/local/Cellar/icu4c/52.1/lib/libicuuc.dylib#/usr/local/Cellar/icu4c/52.1/lib/libicui18n.52.1.dylib#52 --libs /usr/local/Cellar/icu4c/4.4.1/lib/libicuuc.dylib#/usr/local/Cellar/icu4c/4.4.1/lib/libicui18n.dylib#44 19DA gc
Unicode version: %s 6.3.0.0
U+19DA (NEW TAI LUE THAM DIGIT ONE)
Other_Number
Unicode version: %s 5.2.0.0
U+19DA (NEW TAI LUE THAM DIGIT ONE)
Decimal_Number
使用普通picu进行相同操作
$ python picu_multi.py --libs /usr/local/Cellar/icu4c/52.1/lib/libicuuc.dylib#/usr/local/Cellar/icu4c/52.1/lib/libicui18n.52.1.dylib#52 --libs /usr/local/Cellar/icu4c/4.4.1/lib/libicuuc.dylib#/usr/local/Cellar/icu4c/4.4.1/lib/libicui18n.dylib#44 19DA gc
INFO:picu_multi:Library '/usr/local/Cellar/icu4c/52.1/lib/libicuuc.dylib' loaded. Unicode version: 6.3.0.0
INFO:picu_multi:Library '/usr/local/Cellar/icu4c/4.4.1/lib/libicuuc.dylib' loaded. Unicode version: 5.2.0.0
INFO:picu_multi:Unicode version: 6.3.0.0
U+19DA (NEW TAI LUE THAM DIGIT ONE)
Other_Number
INFO:picu_multi:Unicode version: 5.2.0.0
U+19DA (NEW TAI LUE THAM DIGIT ONE)
Decimal_Number
项目详情
关闭
munidata-2.4.0.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | fb3e2e4d6a179e9b051234d1f6c768ce14a7b1199ce27444c64a1bf49480e1a3 |
|
MD5 | d1ede763f9d67c44dec7281716d0d074 |
|
BLAKE2b-256 | b1eb98da983f1dda3c7a4c358a7e5e608344c0ad5e14022693c3693b7f51c98a |