Skip to main content

繁体简体转换

Project description

1. 功能

(1)繁体转换成简体

(2)简体转换成繁体

2. 快速开始

(1)繁体转简体

from pylangtools.langconv import Converter

if __name__=="__main__":
    traditional_sentence = '陳奕迅'
    simplified_sentence = Converter('zh-hans').convert(traditional_sentence)
    print(simplified_sentence)#陈奕迅

(2)简体转繁体

from pylangtools.langconv import Converter

if __name__=="__main__":
    simplified_sentence = '陈奕迅'
    traditional_sentence = Converter('zh-hant').convert(simplified_sentence)
    print(traditional_sentence)#陳奕迅

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylangtools-0.0.2.tar.gz (324.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page