Last updated 5 years ago
Was this helpful?
windows直接pip安裝頗麻煩
OpenCC套件(可直接引用) ->
範例:
先clone git專案內容並把opencc資料夾放到py檔同目錄
from opencc import OpenCC cc = OpenCC('s2twp') # convert from Simplified Chinese to Traditional Chinese to_convert = '开放中文转换鼠标' converted = cc.convert(to_convert) print(converted) # 輸出開放中文轉換滑鼠