This project uses the open source Chinese-English dictionary to expose an API for translation of chinese characters. The script dictionary_bootstrapper.sh automatically downloads the latest dictionary and executes a go program to parse the dictionary and store it into a BoltDB file.
docker build -t cndict .
docker run -p 3141:3141 cndict
curl -s localhost:3141/lookupCharacters/电脑业者 | jq
{
"Traditional": "電腦業者",
"Pinyin": "dian4 nao3 ye4 zhe3",
"Translations": [
"software developer"
]
}
This project is licensed under the MIT License - see the LICENSE.md file for details