Hi, I’m very happy to announce my first julia package WordCloud.jl here. Word cloud (tag cloud or wordle) is a novelty visual representation of text data. The importance of each word is shown with font size or color. WordCloud.jl has the following highlights:
- Flexible Any mask, any color, any angle, adjustable filling rate. You can specify the initial position of some words. Or you can pin some words and adjust others, etc.
- Fast 100% in Julia and efficient implementation based on Quadtree & gradient optimization. The advantage is more obvious when generating large images.
- Exact Words with the same weight have the exact same size. The algorithm will never scale the word to fit the blank.
using WordCloud wc = wordcloud( process(open(pkgdir(WordCloud)*"/res/alice.txt"), stopwords=WordCloud.stopwords_en ∪ ["said"]), mask = loadmask(pkgdir(WordCloud)*"/res/alice_mask.png", color="#faeef8"), colors = :Set1_5, angles = (0, 90), fillingrate = 0.7) |> generate! paint(wc, "alice.png", ratio=0.5, background=outline(wc.mask, color="purple", linewidth=1))
You can install WordCloud.jl with command
import Pkg; Pkg.add("WordCloud"), and see
runexample for more examples.
I am looking forward to your valuable suggestions. Thank you.