“标签云”发电机? [英] "tag cloud" generators?

查看:243
本文介绍了“标签云”发电机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我正在处理的专案新增「标签云」。

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:

我正在寻找一个或者有


  • 一个很好的web访问api

  • 独立的本地可执行文件(优先为linux)

  • 一个可链接的库(c,python首选)

当然,其他选项和建议赞赏!

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.

>更新2:最优秀Jonathan Feinberg和IBM发布了Wordle ... hooray !!!

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


http://www.wordle.net


推荐答案

我不知道你是指一个简单的(ala Flickr 标签云,或有点复杂,像 Wordle

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

无论如何,如果你正在寻找一个简单的标签云,它不会太难实现它自己(只要你已经有能力来渲染HTML),因为它只是改变了每个项目的大小和/或颜色(或其他度量)。

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).

如果要使用现有的库,您可以查看一个开源的php版本,例如标签云,只是在您的机器上使用php而不是通过Web服务器在本地运行它们。只需安装php并运行 php filename.php ,类似于如何执行python脚本。

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.

Wordle服务,似乎没有办法自动创建一个,因为他们使用一个java小程序来生成图形,这不能轻易地使用 curl 脚本化。他们在API的问题中有关API的说明:

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:


可扩展的Web服务不应该花费
超过几十毫秒
来完成它的工作。创建Wordle
在Java
运行时中需要多秒。 (漂亮的动画不是
的show;它是真的在动画期间放置
)。因此,
Wordle总是将
CPU密集型的东西分配给你,用户
和你的CPU。

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.

这个写作,Wordle是
维持每秒10次点击。有
没有办法在地球上渲染Wordle在
速度。有一种方法,但
它涉及比我
获得更多的钱。

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.

,此上一个问题可能会有帮助。

这篇关于“标签云”发电机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆