"tag cloud" generators?
Asked Answered
P

3

10

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

Physical answered 22/2, 2009 at 2:13 Comment(3)
Yeah I was wondering that too. Can you link an example of the sort of thing you're after?Unterwalden
I can't find the wordcloud api from the IBM link you posted. Where can I find it now please?Aztec
Thanks for updating the post, but the website doesn't offer the API. I need to generate the clouds from code.Aztec
Z
8

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.

Zyrian answered 22/2, 2009 at 2:40 Comment(2)
thanks! wordle is really nice looking... it seems the create page doesn't send anything to the server, but invokes the java applet?Physical
mark, that sucks! I've edited the answer to make it more clearZyrian
B
11

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.

Barthol answered 5/8, 2012 at 21:17 Comment(3)
This looks like a great project. The output images look really nice. It's implemented in Java for Processing, and is hosted on GitHub.Touraine
I make WordCram. Glad you like it!Heterozygous
@dan-bernier Great Job!Codling
Z
8

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.

Zyrian answered 22/2, 2009 at 2:40 Comment(2)
thanks! wordle is really nice looking... it seems the create page doesn't send anything to the server, but invokes the java applet?Physical
mark, that sucks! I've edited the answer to make it more clearZyrian
S
2

Here are two Python-Versions of a tag cloud:

I search a lot these days and it seems that those two are some of the few "stand-alone" tag cloud generators, which run in Linux (in particular those run in python) on the command line.

Subordinary answered 19/1, 2014 at 19:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.