some Chinese related things
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Chinese Tools

Some Chinese related things. (Yes, things...)

##chengyu.txt The file contains a chengyu for each line. The chengyus comes from the txt file from this webpage's download. The original file has more detailed descriptions.


Pick a chengyu with "日" as one of the characters, and highlight it with quotes.

sed -n 's/日/"日"/p' chengyu.txt | sort --random-sort | head -n 1

Output: 出头之"日"

Note: sort --random-sort doesn't work on machines without gnu-coreutils.

节操尽失. This program will break the input Chinese characters into radicals if the corresponding ideographic description character is ⿰ or ⿲.

The library requires cjklib, and of course, python 2.7 or above. The code is ugly, because it's not Haskell.


./ 你好吗Pepper~

Output: 亻尔女子口马Pepper~