Skip to content

penut85420/ZhConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZhConverter

Build Status

Introduction

  • 使用 MediaWiki 上的 ZHConversion.php 完成的簡繁轉換系統。

Preparation

  • 前往 MediaWiki 下載最新版的 MediaWiki.tar.gz
  • 解壓縮後尋找 ZhConversion.php
    • 當前版本放置於 ./language/data/ 下。
  • 使用 php_conv.py 提取簡繁對應檔案。
    • 產生簡繁對應的 .txt & .pkl 共四個檔案。

Usage

  • Example
    from zhhanz_conv import ZhhanzMan
    
    zm = ZhhanzMan()
    zm.trans_s2t('皇后在后面吃面') # Output: '皇后在後面吃麵'
    zm.trans_t2s('皇后在後面吃麵') # Output: '皇后在后面吃面'

Reference

About

Zh converter from Wikipedia.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published