How hongt-chen/pinyin_to_ja works
This repository contains separate English- and Chinese-to-katakana converters. The Chinese CLI converts input through pinyin and a JSON mapping while preserving non-Chinese characters; the English module uses G2P phonemes and katakana conversion rules. Source excerpts show the conversion logic but omit parts of the English runtime path, and the web page is unsampled, so those connections are not inferred.
Main entry points: pinyin/main.py Chinese converter · english/main.py English CLI · data.json Pinyin kana map
Components 8
English conversion
- English CLI
to_kana/english/main.py - English converter
to_kana/english/main.py - G2P engine
Chinese conversion
- Chinese CLI
to_kana/pinyin/main.py - Chinese converter
to_kana/pinyin/main.py - Pinyin library
- Pinyin kana map
to_kana/pinyin/data.json
Other components
- User
Connections 6
- English CLI → G2P engine: prewarms
to_kana/english/main.py - English converter → G2P engine: generates phonemes
to_kana/english/main.py - User → Chinese CLI: enters text
to_kana/pinyin/main.py - Chinese CLI → Chinese converter: converts input
to_kana/pinyin/main.py - Chinese converter → Pinyin library: gets pinyin
to_kana/pinyin/main.py - Chinese converter → Pinyin kana map: looks up kana
to_kana/pinyin/main.py