标签云网络服务?

时间:2008-12-04 01:29:31

标签: tag-cloud

是否有可以生成标签云的公共免费网络服务?我正在寻找像谷歌图表 - URL in,image out。

5 个答案:

答案 0 :(得分:2)

我非常怀疑。用于此的Web服务没有任何意义。

但是有很多图书馆:

CodeIgniter:http://codeigniter.com/forums/viewthread/64498/

Java:http://opencloud.sourceforge.net/

答案 1 :(得分:2)

这对我来说仍然有意义,但我找不到任何此类服务。实际上,API可以是单词,样式文本输出或单词输入,图像输出。我将在SWT中实现我需要的东西并从那里开始。

您可以在http://www.wordle.net/gallery/wrdl/359579/JUnit_Tests看到我想要生成的事物示例。这些是JUnit自我测试名称中的单词。

答案 2 :(得分:0)

也许你可以使用它:http://www.wordle.net/

答案 3 :(得分:0)

意识到这是一篇旧帖子,但我认为tagcrowd.com可能会在这里工作,尽管没有API访问权限。商业许可便宜19.95美元。

答案 4 :(得分:0)

12年后,我决定构建此World Cloud API。您将其发送给您的文本,它将呈现一个PNG或SVG词云,其词标记按频率缩放。

这是一个使用著名演讲的简单URL示例:

https://quickchart.io/wordcloud?text=Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.But, in a larger sense, we can not dedicate—we can not consecrate—we can not hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us—that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion—that we here highly resolve that these dead shall not have died in vain—that this nation, under God, shall have a new birth of freedom—and that government of the people, by the people, for the people, shall not perish from the earth.

Word Cloud API example

请注意,GET请求通常要求您对文本进行URL编码,尤其是在包含特殊字符的情况下。

有许多参数可让您自定义和扩展词云。一些值得注意的包括:

  • 文本:从(必需)创建标签云的实际文本
  • scale :确定单词按频率缩放的功能。 linear(默认),sqrtlog
  • removeStopWords :设置为true以删除常见的英语单词
  • fontScale :确定单词基线大小的乘数

对于较大的文本,应使用POST请求,而不是在URL中进行编码。这是Python中的示例用法:

resp = requests.post('https://quickchart.io/wordcloud', json={
    'format': 'png',
    'width': 1000,
    'height': 1000,
    'fontScale': 15,
    'scale': 'linear',
    'removeStopwords': True,
    'minWordLength': 4,
    'text': 'To be or not to be, that is the question...',
})

with open('shakespeare.png', 'wb') as f:
    f.write(resp.content)

我记录了所有API选项和多个词云示例here

希望有人觉得这有用!