Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"tag cloud" generators?

I would like to add a "tag cloud" to a project I'm working on. I see tons of them via google, but they seem to mostly be "enter an url" type.

Here's an example of what I mean:

I'm looking for one which either has either

  • a nice web-accessible api
  • a standalone local executable (linux preferred)
  • a linkable library (c,python preferred)

of course, other options and suggestions appreciated!

update: it seems what I am looking for is commonly called a tag cloud and not a text cloud, even though I am interested in using it to view blocks of text.

update 2: the Most Excellent Jonathan Feinberg and IBM have release Wordle... hooray!!!

http://www.wordle.net

like image 790
Mark Harrison Avatar asked Feb 22 '09 02:02

Mark Harrison


People also ask

What is a tag cloud used for?

A tag cloud (also known as a word cloud, wordle or weighted list in visual design) is a visual representation of text data, which is often used to depict keyword metadata on websites, or to visualize free form text. Tags are usually single words, and the importance of each tag is shown with font size or color.

What is a tag cloud and how does it work?

Word clouds (also known as text clouds or tag clouds) work in a simple way: the more a specific word appears in a source of textual data (such as a speech, blog post, or database), the bigger and bolder it appears in the word cloud. A word cloud is a collection, or cluster, of words depicted in different sizes.


2 Answers

This question is old and already answered, but I would like to say that Wordcram seems to be very nice. And it's open source.

like image 131
Cacovsky Avatar answered Sep 29 '22 11:09

Cacovsky


I'm not sure if you are referring to a simple (ala Flickr) tag cloud, or something a little more complicated like Wordle.

Anyway, if you are looking for a simple tag cloud, it wouldn't be too difficult to implement it yourself (as long as you already have the ability to render HTML) as it is just changing the size and/or colour of each item based on its frequency (or some other measure).

If you want to use an existing library you could look at one of the opensource php versions, like Tag Cloud, put just run them locally on your machine using php rather than through a web server. Just install php and run php filename.php similar to how you would execute a python script.

Looking at the Wordle service, there appears to be no way to automatically create one, as they use a java applet to generate the graphics, which cannot easily be scripted using curl. They do have a question in their FAQ about an API however:

Could you expose Wordle as a web service that generates images?

A scalable web service should take no more than a few tens of milliseconds to do its work. To create a Wordle requires multiple seconds in a Java runtime. (That pretty animation is not for show; it's really laying things out during the animation). Therefore, Wordle will always apportion the CPU-intensive stuff to you, the user, and your CPU.

As of this writing, Wordle is sustaining 10 hits per second. There's no way on Earth to render Wordles at that speed. Well there is a way, but it involves way more money than I've got.

Also, this previous question may help.

like image 40
David Dean Avatar answered Sep 29 '22 12:09

David Dean