views:

2511

answers:

3

Context

My Questions

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

Why I'm asking

  • just curious
  • want to learn
+5  A: 

http://code.google.com/apis/visualization/documentation/gallery.html

Check out the word cloud visualization. Not as fancy as wordle.net but real easy to add to your site.

Wavel
+19  A: 

I'm the creator of Wordle. Here's how Wordle actually works:

Count the words, throw away boring words, and sort by the count, descending. Keep the top N words for some N. Assign each word a font size proportional to its count. Generate a Java2D Shape for each word, using the Java2D API.

Each word "wants" to be somewhere, such as "at some random x position in the vertical center". In decreasing order of frequency, do this for each word:

place the word where it wants to be
while it intersects any of the previously placed words
    move it one step along an ever-increasing spiral

That's it. The hard part is in doing the intersection-testing efficiently, for which I use last-hit caching, hierarchical bounding boxes, and a quadtree spatial index (all of which are things you can learn more about with some diligent googling).

Jonathan Feinberg
Thanks for the excellent information. You sir, rule.
namenlos
"Diligent Googling". Like it :)
zengr
+2  A: 

I've implemented an algorithm as described by Jonathan Feinberg using python to create a tag cloud. It is far away from the beautiful clouds of worlde.net but it gives you an idea how it could be done.

You can find the project here.

aeby
Thanks for sharing! I'll definitely be looking through your implementation.
namenlos
You're welcome! All inputs are appreciated.
aeby