“标签云” 发电机?

发布于 2024-07-13 22:43:43 字数 638 浏览 6 评论 0原文

我想向我正在进行的项目添加“标签云”。 我通过谷歌看到了很多,但它们似乎大多是“输入网址”类型。

这是我的意思的一个例子:

我正在寻找一个,它要么有

  • 一个很好的可通过网络访问的 api,要么有
  • 一个独立的本地可执行文件(首选 Linux),有
  • 一个可链接库(首选 c,python)

,当然还有其他选项建议表示赞赏!

更新:看来我正在寻找的通常称为标签云而不是文本云,尽管我有兴趣使用它来查看块文本。

更新 2:最优秀的 Jonathan Feinberg 和 IBM 发布了 Wordle...万岁!!!

http://www.wordle.net

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蓝颜夕 2024-07-20 22:43:43

这个问题很旧并且已经回答了,但我想说 Wordcram 似乎非常好。 而且它是开源的。

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.

琴流音 2024-07-20 22:43:43

我不确定您是否指的是一个简单的(ala Flickr标签云,或者稍微复杂一点的东西,比如Wordle.

无论如何,如果您正在寻找一个简单的标签云,那么自己实现它并不会太困难(只要您已经具备渲染 HTML 的能力),因为它只是更改每个项目的大小和/或颜色基于其频率(或其他一些措施)。

如果您想使用现有的库,您可以查看开源 php 版本之一,例如 Tag Cloud,只需使用 php 在您的计算机上本地运行它们,而不是通过 Web 服务器。 只需安装 php 并运行 php filename.php ,类似于执行 Python 脚本的方式。

查看 Wordle 服务,似乎无法自动创建一个服务,因为它们使用 Java 小程序来生成图形,而使用 curl 无法轻松编写图形。 然而,他们的常见问题解答中确实有一个关于 API 的问题

您能否将 Wordle 公开为网络
生成图像的服务?

可扩展的 Web 服务不应该
超过几十毫秒
做它的工作。 创建 Wordle
在 Java 中需要几秒钟
运行。 (那个漂亮的动画不是
用于展示; 这真的是在铺设东西
动画期间退出)。 所以,
Wordle 将始终分配
对于用户来说,CPU 密集型的东西,
和你的CPU。

在撰写本文时,Wordle 是
每秒持续 10 次点击。 有
地球上没有办法渲染 Wordles
那个速度。 嗯,有一个办法,但是
它涉及的钱比我多得多
得到了。

另外,这个 上一个问题可能有帮助。

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.

£冰雨忧蓝° 2024-07-20 22:43:43

以下是标签云的两个 Python 版本:

  • https://github.com/atizo/PyTagCloud
  • < a href="http://peekaboo-vision.blogspot.de/2012/11/a-wordcloud-in-python.html" rel="nofollow">http://peekaboo-vision.blogspot.de/2012/ 11/a-wordcloud-in-python.html

这些天我搜索了很多,似乎这两个是少数几个在 Linux 中运行的“独立”标签云生成器(特别是那些运行在 python 中)在命令行上。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文