【文件属性】:
文件名称:wordcloud:高朗wordcloud
文件大小:21.27MB
文件格式:ZIP
更新时间:2021-05-18 08:40:44
golang wordcloud Go
golang版本的文字云算法实现
效果图
测试步骤如下
git clone https://github.com/bangbaoshi/wordcloud.git
cd wordcloud
go run boot/main.go
通过以上三步即可在imgs目录中生成文字云图片(查看imgs/out.png)
目录介绍
boot目录包含测试用例
fonts目录包含若干种字体(非商业使用)
imgs目录包含模板图片,文字云生成的效果图就是按照模板图片的样子来生成
使用说明
boot/main.go中已经简单介绍了使用方法
package main
import (
"image/color"
"github.com/bangbaoshi/wordcloud"
)
func renderNow() {
//需要写入的文本数组
textList := []string{"恭喜", "发财"
【文件预览】:
wordcloud-master
----fonts()
--------hanyi2.ttf(4.17MB)
--------AaBanSong.ttf(2.68MB)
--------xin_shi_gu_yin.ttf(9.73MB)
--------hanyi1.ttf(7.11MB)
--------hanyi3.ttf(4.68MB)
--------heiti.TTF(2.85MB)
----.gitignore(289B)
----go.mod(302B)
----LICENSE(11KB)
----.DS_Store(6KB)
----go.sum(755B)
----README.md(1KB)
----imgs()
--------china.png(20KB)
--------tiger.png(13KB)
--------template.png(124KB)
--------football.png(15KB)
--------circle.png(25KB)
--------foot.png(11KB)
--------foot_template2.png(174KB)
--------water.png(8KB)
--------foot_template.png(178KB)
--------build.png(5KB)
--------out.png(162KB)
--------dot.png(16KB)
--------template2.png(139KB)
--------animal.png(20KB)
----render_test.go(618B)
----math.go(6KB)
----render.go(5KB)