#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規則集

10 releases

0.3.2 Nov 27, 2024
0.3.2-3 Jan 15, 2025
0.3.1 Mar 22, 2024
0.3.0 Jul 4, 2023
0.1.0-beta Dec 27, 2021

#747 in Text processing

43 downloads per month

GPL-2.0-or-later

1.5MB
6K SLoC

PHP 5K SLoC Rust 573 SLoC // 0.1% comments TSX 253 SLoC // 0.1% comments Shell 135 SLoC // 0.1% comments Python 89 SLoC // 0.3% comments JavaScript 6 SLoC // 0.2% comments TypeScript 5 SLoC

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

~0–9.5MB
~103K SLoC