A simple word cloud inplementation. 不多說,文字雲是最好的詞頻視覺化功能!
- Build a list of terms 建立文字清單
terms = ['我', '我', '是', '一顆', '文字雲', '文字雲', '我']
- make mask (optional) 想要文字雲出現的圖示
會輸出圖片的圖片形狀遮罩mask及顏色遮罩image_colors
mask, image_colors = get_mask()
- build the word cloud by given terms and mask 建立文字雲
wordcloud = build_word_cloud(terms, mask)
- make the figure and save as file 製成圖片格式並輸出
顏色遮罩可以在這邊設定
make_and_save_figure(wordcloud, image_colors)