#chinese #mediawiki #conversion #localization #opencc #ruleset #variant

app zhconv-cli

Convert Traditional/Simplified Chinese and regional words of Taiwan/Hong Kong/mainland China/Singapore based on Wikipedia and OpenCC rulesets 轉換中文簡體、繁體及兩岸、新馬地區詞,基於維基百科和OpenCC規則集

9 releases

0.3.2 Nov 27, 2024
0.3.1 Mar 22, 2024
0.3.0 Jul 4, 2023
0.3.0-beta Jun 27, 2023
0.1.0-beta Dec 27, 2021

#765 in Text processing

Download history 13/week @ 2024-09-23 4/week @ 2024-09-30 123/week @ 2024-11-25 15/week @ 2024-12-02

138 downloads per month

GPL-2.0-or-later

6MB
24K SLoC

PHP 20K SLoC // 0.0% comments Rust 2K SLoC // 0.1% comments TSX 1K SLoC // 0.1% comments Shell 543 SLoC // 0.1% comments Python 357 SLoC // 0.3% comments JavaScript 27 SLoC // 0.2% comments TypeScript 22 SLoC // 0.2% comments

zhconv-cli 中文简繁及地區詞轉換

zhconv-cli converts Chinese text among several scripts or regional variants (e.g. zh-TW <-> zh-CN <-> zh-HK <-> zh-Hans <-> zh-Hant), based on conversion rulesets from Mediawiki/Wikipedia and OpenCC.

For more information, check zhconv-rs.

USAGE:
    zhconv [FLAGS] [OPTIONS] <VARIANT> [--] [FILE]...

FLAGS:
        --wikitext      Treat the input text as wikitext and process inline conversion rules in MediaWiki syntax
        --dump-table    Dump the built-in conversion table, along with additional rules specified if any
    -h, --help          Prints help information
    -V, --version       Prints version information

OPTIONS:
        --rule <rules>...               Additional conversion rules in MediaWiki syntax (excluding -{, }-)
        --rules_file <rule-files>...    File(s) consisting of additional conversion rules in MediaWiki syntax (excluding
                                        -{, }-) seperated by LF

ARGS:
    <VARIANT>    Target variant to convert to (zh, zh-Hant, zh-Hans, zh-TW, zh-HK, zh-MO, zh-CN, zh-SG, zh-MY)
    <FILE>...    File(s) to convert in-place (omit for stdio)

Dependencies

~8–18MB
~253K SLoC