# Wordfreq script ## Prerequisites * Python 3 * Python 3 modules: `wordcloud`, `PIL`, `matplotlib`, `numpy`, and `jieba` * The TTF/OTF file of the font you want to use ## Example ```bash wget https://bf.mengyan1223.wang/assets/fonts/{SourceHanSans.ttc,ttc2ttf.py} python3 ttc2ttf.py SourceHanSans.ttc ./wordfreq.py -i example.in -o example.png -p n,ne -f SourceHanSans11.ttf -t 60 ``` You should use Source Han Sans font under the terms of SIL Open Font License 1.1. ## Parts of speech See `pos.txt`, [origin gist](https://gist.github.com/hscspring/c985355e0814f01437eaf8fd55fd7998) by [hscspring](https://gist.github.com/hscspring). ## Acknowlegement * [Python](https://www.python.org) * [wordcloud](https://github.com/amueller/word_cloud) * [jieba](https://github.com/fxsjy/jieba) And, special thanks to Lao She who authors `example.in` (*Mr. Breeches*, 1933).