美文网首页
python的繁体简体转换

python的繁体简体转换

作者: 是东东 | 来源:发表于2019-04-02 16:53 被阅读0次
# 安装
# pip install opencc-python-reimplemented

# t2s - 繁体转简体(Traditional Chinese to Simplified Chinese)
# s2t - 简体转繁体(Simplified Chinese to Traditional Chinese)
# mix2t - 混合转繁体(Mixed to Traditional Chinese)
# mix2s - 混合转简体(Mixed to Simplified Chinese)

import opencc
cc = opencc.OpenCC('t2s')
s = cc.convert('眾議長與李克強會談')
print(s)

相关文章

网友评论

      本文标题:python的繁体简体转换

      本文链接:https://www.haomeiwen.com/subject/sfggbqtx.html