tagging3Add my vote for this tag create new tag
, view all tags

TagCloudPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on TagCloudPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on the TagCloudPlugin

There is some feature overlap with the TagMePlugin. But I think the TagCloudPlugin is more flexible in doing just that one thing. I played around with the TagMePlugin on TWiki.org and this is real fun adding tags here and there and have an easy way to come back to the topics. Cool.

Regarding the TagCloudPlugin I would've liked to add predefined cloud styles but maybe someone else can come back to that. There are nice tag clouds out there, flashy once, discrete once, maybe even moving once (joke). OliverKrueger suggested to add text2speech settings mapping tag weights to the volume it is spoken out. Hehe.

And yes, there might be a need to cache the output of the tag cloud in some way and a refresh urlparam too.

-- MichaelDaum - 01 Mar 2006

Thanks Micha for sharing this plugin with the community!

-- PeterThoeny - 01 Mar 2006

Can the TagMePlugin be made to interact with the TagCloudPlugin in order to avoid code duplication?

-- FranzJosefSilli - 01 Mar 2006

Yes, that's quite straight-forward something like

%TAGCLOUD{"%TAGME{"showalltags" format="$tag:$size"}%" ... }%
That should do. Can you confirm that, Franz? This makes use of the weighted term syntax term:count . Btw there's no code duplication, only a feature overlap.

-- MichaelDaum - 01 Mar 2006

How about measuring and documenting the PluginBenchmarks numbers?

-- PeterThoeny - 01 Mar 2006

The doc page mentions spit - should be split?

Is there a way to limit the number of generated tags, to let's say 20. And to add a link "View all tags"?

-- ArthurClemens - 04 Mar 2006

Will correct the spelling.

Adding a limit argument is a low hanging fruit. But what I really would like to have is to display only every x-th tag with dots between them in case of lots of tags; when I click on the dots between tagN and tagM I could zoom in displaying tags tagN to tagM only. So we need

  • limit: maximum cloud size
  • threshold: maximum cloud size displayed without dots between tags
  • from, to: zoom into tag cloud displaying only tags from to to
to support those use cases.

-- MichaelDaum - 06 Mar 2006

A neat looking way to display the cloud would be to group them together like this (alphabetically): http://confluence.atlassian.com/labels/listlabels-alphaview.action?key=DOC

-- RyanKnoll - 06 Mar 2006

Yes, nice. Thanks Ryan for the pointer. But strictly speaking that's no tag cloud, only a grouped list of tags that does not visualize their weight. Anyway, given we had from, to params for TAGCLOUD that kind of list is doable too given from and to take regular expressions (why shouldn't they).

-- MichaelDaum - 06 Mar 2006

Puh, people usually don't talk regex very fluently. Could be compensated by providing 'talking' examples. wink

BTW: the combination of TagCloudPlugin and TagMePlugin doesn't seem to work on my SVN driven develop setup. frown

-- FranzJosefSilli - 06 Mar 2006

Oh, I see. The TagCloudPlugin is using registerTagHandler() but the TagMePlugin does it the old way using the commonTagsHandler(). So there's no way to force parsing left-to-right-inside-out between them, that is: the TagCloudPlugin sees the %TAGME{}% tag which it shouldn't.

Two things that can be done:

  1. add $percnt and a manual call to expandCommonVarialbes() after expanding that to % to the termlist parameter; that grants maximum backwards compatibility to generate term lists by any (old) plugin.
  2. the TagMePlugin could replace its commonTagsHander() by registering tags; but that'd make the TagMePlugin a dakar-only plugin which might not be desirable

-- MichaelDaum - 07 Mar 2006

Now try

%TAGCLOUD{"$percntTAGME{\"showalltags\" format=\"$dollartag:$dollarsize\"}$percnt" ... }%
with the new v0.30 release.

-- MichaelDaum - 07 Mar 2006

Micha: Small detail, the topic summary of the TagCloudPlugin topic as seen in WebChanges just shows "TagCloudPlugin" due to to long "PLEASE DO NOT EDIT THIS TOPIC" description on top. Might be better to put that at the end, or to shorten it.

-- PeterThoeny - 10 Mar 2006

sounds like WebChanges should be smarter. (like filtering out HTML comments for the display or something...)

-- WillNorris - 10 Mar 2006

Ah, no. It was because of the %STARTINCLUDE% and the extra newline. It does filter out the html comments -- or simply leaves them in. Does not matter. I deleted the empty lines around %TOC% and now things are fine for WebChanges.

-- MichaelDaum - 10 Mar 2006

When testing a different split, I could not get any results. Then I found I had to set the minimum count to 1.

-- ArthurClemens - 21 Jun 2006

Yesterday we ran a "text message your ideas" action in our company, and now I am generating a tag cloud from the results. There where quite a bit of "2.0" words messaged, but these did not appear in the tag cloud. Looking into the code I see that TagCloudPlugin removes numbers and dots from words. It would be more useful to me if it didn't.

Because Dutch uses the ' character quite a lot (for example: "van 't concept des levens heeft niemand 't program"), this should not be removed either.

-- ArthurClemens - 21 Jun 2006

plural="off" will eat 's' characters at the end of words. So xxxs becomes xxx.

-- ArthurClemens - 22 Jun 2006

How can I extract words to show in a topic when I use CommentPlugin to create a table of user input? I get these in this format:

| test | anonymous | 14 jul 2006 - 17:15 |
I would like to use the date to limit the cloud to a certain time period, but that is another issue.

-- ArthurClemens - 14 Jul 2006

The [[%ATTACHURL%/%TOPIC%.zip][Download]] link fails if this Plugin is installed; it works only here on TWiki.org. Better to write the full URL [[http://twiki.org/p/pub/Plugins/%TOPIC%/%TOPIC%.zip][Download]]. Actually I think it is better to keep the original text "Download the ZIP file from the Plugin web (see below)" (and fix the viewfile issue on TWiki.org.)

-- PeterThoeny - 05 Aug 2006

It would be nice if we could designate a set of topics which will be tokenized and subjected to tags analysis.

-- ThomasWeigert - 04 Jan 2007

This feature is not implemented by purpose. You can use arbitrary TWiki markup (properly escaped) to construct a term list. See the example that uses an INCLUDE to get the text of another topic. Use a SEARCH instead and you've got what you want.

-- MichaelDaum - 04 Jan 2007

Yes. I know I can construct a list of included topics using the SpreadSheetPlugin but that seems an awfully inefficient way:

%CALC{"$LISTMAP( $NOP(%)INCLUDE{"$item"}$NOP(%),  %TOPICLIST{web="%WEB%" separator="," }%     )" }%

-- ThomasWeigert - 05 Jan 2007

It is a design decision: the plugin only reads the list of terms and you are responsible to generate one. Save the text below in a topic called RenderTagCloud:

~~~    "$percntSEARCH{\".*\" 
~~~        type=\"regex\" 
~~~        topic=\"%TOPICS%\" 
~~~        nonoise=\"on\" 
~~~        format=\"$dollarpercntINCLUDE{\\"$dollartopic\\"}$dollarpercnt\"
~~~     }$percnt
~~~    "
~~~ }%

... and call it using %INCLUDE{"RenderTagCloud" TOPICS="LoremIpsum1,LoremIpsum2"}%.

-- MichaelDaum - 05 Jan 2007

If you have something like the following

%TAGCLOUD{ "Description 
<aaa bbb="abc" ccc="def">
More detailed description to be inserted here " min="1" stopwords="on" exclude="the" buckets="40" offset="12" lowercase="on" plural="off" }%
you end up with a bunch of unreadable lines, as shown in the attached screen shot (this screenshot was generated from a different text, but the effect is similar).

The problem text is the

<aaa bbb="abc" ccc="def">

Note that if you use just

<aaa ccc="def">
the problem does not occur.

-- ThomasWeigert - 05 Jan 2007

Although the bucketizing algorithm reflects the actual distribution of the set more accurately than a linear distribution, it can fail as seen in Thomas' first screenshot. The TagMePlugin "linearizes" the set: It first creates a sorted list of the set, then does a linear distribution across the whole set. This way you get a nice visual distribution between the min and max values, also for unlinear sets such as logarithmic sets. Possibly add a flag to TagCloudPlugin to linearize the data set?

-- PeterThoeny - 05 Jan 2007

This is a nice idea! On the other too much of a normalization will render the tag clouds boring.

-- MichaelDaum - 10 Jan 2007

TWiki's attribute parser has problems to get the full term list with <aaa bbb="abc" ccc="def"> in it. It stops after Description <aaa bbb="abc. More important it does not get the other parameters, i.e. the offset="12" setting. As a consequence fonts are of size 1px instead of size 13px.

In a way the example is a bit artificial as the list of terms should be generated by an escaped TML expression (e.g. $percntINCLUDE{...}$percnt) where this problem does not occur.

-- MichaelDaum - 10 Jan 2007

That is actually a feature of TWiki's attribute parser, it scans for name="value" pairs, e.g. you can't have a name="value" construct within a parameter, such as the default parameter (that is, nesting is not supported.)

-- PeterThoeny - 11 Jan 2007

This example is not contrived. I ran into this when I sucked in a topic via include to have it rendered as a tag cloud, only to end up with this result. The topic had an <img> tag in it which caused the unpleasant result. Not only was the font very small, but also, only the words before the offending tag were considered.

Given that this plugin seems to want to analyze included topics, in needs to be resilient against "bad" terms in the list...

-- ThomasWeigert - 11 Jan 2007

Hmm, how about removing all HTML before creating the data set?

-- PeterThoeny - 11 Jan 2007

Certainly one can prepare a data set. However, a documented use model of this plugin is to $percntINCLUDE{...}$percnt a topic, so I would expect that to work for all topics...

Here is the use case I am interested in: Say you have a large number of topics. I want to create a tag cloud of the most important concepts in those topics. Certainly most words will be not important (these will be more than just the standard stop words). I want to

  • get a list of the words in the topics with frequency (both in the topic text as well as in the form)
  • be able to indicate the ones I think are important and
  • be able to indicate which ones are not and should be excluded henceforth
  • render a tag cloud of the selected words.

I think there is a need of creating, in a convenient manner, an initial tag cloud for topics and then allow users to add to that cloud, in the style of TagMePlugin.

-- ThomasWeigert - 11 Jan 2007

Also, is it possible to not have the lines write on top of each other, as shown in this attached snapshot.

-- ThomasWeigert - 05 Jan 2007

Is this Plugin for tagging twiki topics as well?

If so i don't understand how to use this Plugin. How do I tag a topic?

If not I don't unterstand why I should need this confused Where's the sense in having terms in a tag cload that do not link to any topic.

-- CarloSchulz - 07 Jun 2007

The TagCloudPlugin is no tagging solution. Furthermore, it is a building piece to write TWikiApplications where a tag cloud is needed. Its input is a list of terms counting its frequencies and generating an appropriate tag cloud. You may feed it with the result of a SEARCH or any other TWikiMarkup expression that generates a list of terms.

If you want a complete tagging solution then have a look at the TagMePlugin. It is able to render tag clouds as well, but you can also delegate that back to the TagCloudPlugin. Alternatively, you may build your own tagging solution based on TWikiForms.

-- MichaelDaum - 07 Jun 2007

ok, thanks for clarification smile I'm already using the TagMePlugin but was a bit disappointed with it's user interface.

-- CarloSchulz - 08 Jun 2007

I changed the ModificationPolicy of this extension from ContactAuthorFirst to PleaseFeelFreeToModify due to inactivity. Anyone please feel free to work on this extension.

-- PeterThoeny - 2012-12-03

Edit | Attach | Watch | Print version | History: r40 < r39 < r38 < r37 < r36 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r40 - 2012-12-03 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.