Algorithm to implement a word cloud like Wordle

Viewed 103824

Context

My Questions

  • Is there an algorithm available that does what Wordle does?
  • If no, what are some alternatives that produces similar kinds of output?

Why I'm asking

  • just curious
  • want to learn
13 Answers

Here is yet another end-to-end implementation of wordle in Python 3 largely based on the initial outline by Jonathan Feinberg (QuadTrees, spirals, etc.).

The code (commented, with detailed ReadMe file) is freely available at this Github repository and this is a sample wordle created with the code.

Macbeth

I've implemented a word cloud generator called WordCloud.jl in Julia language. A brief description about its algorithm can be found here.
Unlike most other implementations, I designed it based on gradient optimization. It’s a non-greedy algorithm in which words can be further moved after they are positioned. Thus the size of the words and the shape and size of the background mask can be kept unchanged in the generation process. This makes the outputs more accurate and easy to customize. Furthermore, we can also generate some fancy outputs like these:
Comparison of Obama's and Trump's inaugural address and Wikipedia: Julia
comparison wordcloud

julia wordcloud

Related