繁简转换
HanLP几乎实现了所有我们需要的繁简转换方式,并且已经封装到了HanLP中,使得我们可以轻松的使用,而分词器中已经默认支持多种繁简格式或者混合。这里我们不再做过多描述。
说明:
·HanLP能够识别简繁分歧词,比如打印机=印表機。许多简繁转换工具不能区分“以后”“皇后”中的两个“后”字,HanLP可以。
算法详解:
·《汉字转拼音与简繁转换的Java实现》——请查阅此文
<!--[if !supportLists]-->1. <!--[endif]-->from pyhanlp import *
<!--[if !supportLists]-->2. <!--[endif]--># 繁简转化
<!--[if !supportLists]-->3. <!--[endif]-->print(HanLP.convertToTraditionalChinese("“以后等你当上皇后,就能买草莓庆祝了”。发现一根白头发"))
<!--[if !supportLists]-->4. <!--[endif]-->print(HanLP.convertToSimplifiedChinese("憑藉筆記簿型電腦寫程式HanLP"))
<!--[if !supportLists]-->5. <!--[endif]--># 简体转台湾繁体
<!--[if !supportLists]-->6. <!--[endif]-->print(HanLP.s2tw("hankcs在台湾写代码"))
<!--[if !supportLists]-->7. <!--[endif]--># 台湾繁体转简体
<!--[if !supportLists]-->8. <!--[endif]-->print(HanLP.tw2s("hankcs在臺灣寫程式碼"))
<!--[if !supportLists]-->9. <!--[endif]--># 简体转香港繁体
<!--[if !supportLists]-->10. <!--[endif]-->print(HanLP.s2hk("hankcs在香港写代码"))
<!--[if !supportLists]-->11. <!--[endif]--># 香港繁体转简体
<!--[if !supportLists]-->12. <!--[endif]-->print(HanLP.hk2s("hankcs在香港寫代碼"))
<!--[if !supportLists]-->13. <!--[endif]--># 香港繁体转台湾繁体
<!--[if !supportLists]-->14. <!--[endif]-->print(HanLP.hk2tw("hankcs在臺灣寫代碼"))
<!--[if !supportLists]-->15. <!--[endif]--># 台湾繁体转香港繁体
<!--[if !supportLists]-->16. <!--[endif]-->print(HanLP.tw2hk("hankcs在香港寫程式碼"))
17.
18.# 香港/台湾繁体和HanLP标准繁体的互转
19.print(HanLP.t2tw("hankcs在臺灣寫代碼"))
20.print(HanLP.t2hk("hankcs在臺灣寫代碼"))
21.
22.print(HanLP.tw2t("hankcs在臺灣寫程式碼"))
23.print(HanLP.hk2t("hankcs在台灣寫代碼"))
1.「以後等你當上皇后,就能買草莓慶祝了」。發現一根白頭髮
2.凭借笔记本电脑写程序HanLP
3.hankcs在臺灣寫程式碼
4.hankcs在台湾写代码
5.hankcs在香港寫代碼
6.hankcs在香港写代码
7.hankcs在臺灣寫程式碼
8.hankcs在香港寫代碼
9.hankcs在臺灣寫程式碼
10.hankcs在台灣寫代碼
11.hankcs在臺灣寫代碼
12.hankcs在臺灣寫代碼
---------------------
作者:Font Tian
相关推荐
简繁转换通.简繁转换通.简繁转换通.简繁转换通.简繁转换通.简繁转换通.
Office 2003 简繁转换加载宏Office 2003 简繁转换加载宏Office 2003 简繁转换加载宏
简繁转换单元简繁转换单元简繁转换单元简繁转换单元
delphi简繁转换工具,帮助你快速转换
1.使用AddinInstallerO.exe安装自动简繁转换的插件(Plugin) 2.可以在加载项看到安装的插件命令,请等候安装完成 3.插件的英文名为MyConverter在文件->选项->加载项可以禁用它 4.再次使用AddinInstallerO.exe可以完全...
非常好用的简繁转换工具,支持各种编码的之间的转换。
简繁转换工具
alfred workflow简繁中文转换工具。python简繁转换工具
Java软件 简繁转换易jar程式嵌入工具
Office 2003简繁转换加载项 为Office 2003添加一个简繁转换功能
模仿语言包式的简繁转换功能插件,轻松实现繁体和简体互换,很方便,只有一个JS文件。
在使用简体中文版win2000/xp玩繁体中文或日文游戏, 游戏简繁转换工具w2kxpcjk2 支持老游戏比较好。 特别是三国志系列
用于对对jar软件加入输入法,实现简繁转换易嵌入
简繁语言转换程序 简繁语言转换程序 简繁语言转换程序 简繁语言转换程序 简繁语言转换程序 简繁语言转换程序
1.使用AddinInstaller.exe安装自动简繁转换的插件(Plugin) 2.可以在工具(Tools)看到安装的插件命令 3.可以使用自定义(Customize)把插件安排到菜单上 4.可以使用自定义(Customize)里的按键Keyboard来定义快捷键 5....
中文简繁转换(C#;也有VB.NET Code)
公司使用多年系统由繁体转为简体,服务器上大量的文档和目录需要转换,于是自己写了一个小工具,可以转换目录名和文件名,支持子目录转换,可以单独转换文件名,有变量控制可以自定义转换深度(自己稍微修改一下)。...
用java写的简繁转换器,挺好用的,还可以实现简单的统计字数以及把.xls文件转化为.txt文件的功能
简繁转换器。今天自己写的 汉子简繁转换器,支持汉子转换,小写英语转Pascal, 暂时不支持word和excel
ConvLite,一个可以用来实现文件的批量简繁字体相互转换的软件