An extremely simple server that converts Chinese characters to pinyin using CC-CEDICT dictionary. Using this dictionary enables us to translate context-dependent words such as 银行 where 行 has multiple possible pronunciations.
Behind the scene, this server simply uses github.com/jcramb/cedict package for downloading dictionary and translate Chinese characters.
- Start translation server
$ docker run --rm -p 8080:8080 ghcr.io/hitochan777/pinyin-translator
- Send http request
$ curl localhost:8080?q=银行
Yín háng
MIT