python 2/3支持koelner拼音的实现。

kph的Python项目详细描述


python 2/3准备好了kólner phonetik(http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik)算法的实现。

用法

>>> import kph
>>> kph.encode("Horst Meier")
'078267'
>>> kph.encode("Horst Mayer")
'078267'
>>> kph.encode("Horst Meier") == kph.encode("Horst Mayer")
True
>>> kph.encode("Detlef Krumm") == kph.encode("Detlef Krum") == \
... kph.encode("Detlef Krunn") == kph.encode("Detlef Krun")
True

许可证

kph - Python module implementing the ‘Koelner Phonetik’ algorithm. Copyright (C) 2011 Robert Schindler

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从旧的ArrayList<ArrayList<Integer>>创建新的ArrayList而不更改旧的?   java JBoss 7 |从随机线程写入jndi   java如何在数据库中有空值的JPA实体中迭代联接列   java Android应用程序在setContentView上崩溃   java如何在表单中预先填充文本字段,其中包含数据库中的信息。jsp?   来自R.raw的java Android文件阅读器。文件   如何将多个WAR(或Java Web应用程序,特别是使用Spring MVC)嵌入到一个承载另一个WAR的网页中?   java动态更新Jlist   gwt分页大结果集Java的最佳方式是什么   JavaCDI:为什么我的瞬态字段被序列化?   使用JAXB更新java XML模板文件   java getGraphics()返回空值   扩展javax的java类。ws。rs.core。无法将应用程序强制转换为Servlet   java方法可能无法在异常时关闭流   公共类的表达式的java非法开始   java年轻一代GC在EXT根扫描上花费了太多时间   使用CXF和具有未发布元数据的WSDL的java