All Projects → bangbaoshi → wordcloud

bangbaoshi / wordcloud

Licence: Apache-2.0 license
golang wordcloud

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to wordcloud

videocloud
Generate word clouds from YouTube videos
Stars: ✭ 14 (-72%)
Mutual labels:  wordcloud
WordCloudSharp
☁️ Ported from http://wordcloud.codeplex.com/
Stars: ✭ 49 (-2%)
Mutual labels:  wordcloud
asreview-wordcloud
ASReview extension to generate wordcloud from data files.
Stars: ✭ 14 (-72%)
Mutual labels:  wordcloud
Wordcloud2.js
Tag cloud/Wordle presentation on 2D canvas or HTML
Stars: ✭ 1,905 (+3710%)
Mutual labels:  wordcloud
D3 Cloud
Create word clouds in JavaScript.
Stars: ✭ 3,460 (+6820%)
Mutual labels:  wordcloud
WordCloud.jl
word cloud generator in julia
Stars: ✭ 66 (+32%)
Mutual labels:  wordcloud
chartjs-chart-wordcloud
Chart.js Word Clouds
Stars: ✭ 34 (-32%)
Mutual labels:  wordcloud
FacebookGraphAPI-Examples
Examples for facebook graph api for python
Stars: ✭ 38 (-24%)
Mutual labels:  wordcloud
Xiecheng Comment
🌈Xiecheng_Comment多线程Threading爬取携程的丽江古城景点评论并生成词云
Stars: ✭ 23 (-54%)
Mutual labels:  wordcloud
JessicaLim8
Profile ReadME! Join my community word cloud!
Stars: ✭ 81 (+62%)
Mutual labels:  wordcloud
soan
Social Analysis based on Whatsapp data
Stars: ✭ 106 (+112%)
Mutual labels:  wordcloud
wordclouds
Wordclouds in go
Stars: ✭ 41 (-18%)
Mutual labels:  wordcloud
National-Petition
청와대 국민청원 분석으로 국민의 생각 알아보기 📈🔬
Stars: ✭ 45 (-10%)
Mutual labels:  wordcloud

golang版本的文字云算法实现

效果图

测试步骤如下

git clone https://github.com/bangbaoshi/wordcloud.git

cd wordcloud

go mod vendor

go run boot/main.go

通过以上三步即可在imgs目录中生成文字云图片(查看imgs/out.png)

目录介绍

  1. boot目录包含测试用例
  2. fonts目录包含若干种字体(非商业使用)
  3. imgs目录包含模板图片,文字云生成的效果图就是按照模板图片的样子来生成

使用说明

boot/main.go中已经简单介绍了使用方法

package main

import (
	"image/color"

	"github.com/bangbaoshi/wordcloud"
)

func renderNow() {
	//需要写入的文本数组
	textList := []string{"恭喜", "发财", "万事", "如意"}
	//文本角度数组
	angles := []int{0, 15, -15, 90}
	//文本颜色数组
	colors := []*color.RGBA{
		{0x0, 0x60, 0x30, 0xff},
		{0x60, 0x0, 0x0, 0xff},
		{0x73, 0x73, 0x0, 0xff},
	}
	//设置对应的字体路径,和输出路径
	render := wordcloud.NewWordCloudRender(60, 8,
		"./fonts/xin_shi_gu_yin.ttf",
		"./imgs/china.png", textList, angles, colors, "./imgs/out.png")
	//开始渲染
	render.Render()
}

func main() {
	renderNow()
}



项目介绍

  1. 使用golang语言实现了文字云算法
  2. 用golang实现一些有趣的想法
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].