“标签云” 发电机?
我想向我正在进行的项目添加“标签云”。 我通过谷歌看到了很多,但它们似乎大多是“输入网址”类型。
这是我的意思的一个例子:
我正在寻找一个,它要么有
- 一个很好的可通过网络访问的 api,要么有
- 一个独立的本地可执行文件(首选 Linux),有
- 一个可链接库(首选 c,python)
,当然还有其他选项建议表示赞赏!
更新:看来我正在寻找的通常称为标签云而不是文本云,尽管我有兴趣使用它来查看块文本。
更新 2:最优秀的 Jonathan Feinberg 和 IBM 发布了 Wordle...万岁!!!
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!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这个问题很旧并且已经回答了,但我想说 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.
我不确定您是否指的是一个简单的(ala Flickr)标签云,或者稍微复杂一点的东西,比如Wordle.
无论如何,如果您正在寻找一个简单的标签云,那么自己实现它并不会太困难(只要您已经具备渲染 HTML 的能力),因为它只是更改每个项目的大小和/或颜色基于其频率(或其他一些措施)。
如果您想使用现有的库,您可以查看开源 php 版本之一,例如 Tag Cloud,只需使用 php 在您的计算机上本地运行它们,而不是通过 Web 服务器。 只需安装 php 并运行 php filename.php ,类似于执行 Python 脚本的方式。
查看 Wordle 服务,似乎无法自动创建一个服务,因为它们使用 Java 小程序来生成图形,而使用
curl
无法轻松编写图形。 然而,他们的常见问题解答中确实有一个关于 API 的问题:另外,这个 上一个问题可能有帮助。
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:Also, this previous question may help.
以下是标签云的两个 Python 版本:
这些天我搜索了很多,似乎这两个是少数几个在 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.