hitochan777 / pinyin-translator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pinyin translator

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.

Getting started

  1. Start translation server
$ docker run --rm -p 8080:8080 ghcr.io/hitochan777/pinyin-translator
  1. Send http request
$ curl localhost:8080?q=银行
Yín háng

License

MIT

About

License:MIT License


Languages

Language:Go 53.6%Language:Vim Script 39.5%Language:Dockerfile 7.0%