Submitted by : betabug at: 2007-03-15T12:08:32+00:00 (10 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Add a "tags" interface and infrastructure.

See also: http://www.trac-hacks.org/wiki/TagsPlugin

Myself, I'm not too overly enthusiastic for this.

from GeneralDiscussion --betabug, Thu, 15 Mar 2007 12:21:51 +0000 reply

jmax wrote: > OK, here's how I see it, as the simplest possible implementation: On each page is a single input field called "tag this page", which can be used to add a tag phrase to a list of tags already added to that page (or empty, if none so far). That's basically it for the UI. The tags added to each page, though, need to go into the ZWiki catalog so that they can be searched. I think it would be an adequate first step to integrate this with the existing search, but there's an obvious use case for making it a separate search (i.e. with its own UI) from the existing one. > > Here's the rationale: trying to do tagging by organizing existing pages (using the parent/subtopic hierarchy) means you have to actually HAVE an existing wiki page in order to use that as a categorizing element. A free-form tagging facility would allow people to put in arbitrary terms which may at some later date become wiki pages (or not). Using wiki badges is a little better in this regard, but it's a bit of a kludge and doesn't integrate nicely into the UI, unless you're prepared to turn the wiki inside out and make backlinks into a first class navigational element. > > So, simplest possible thing: add one field, which goes to a list property on each page, and catalog them so they come up in the searches.

Multiple hierarchies --jmax, Thu, 15 Mar 2007 23:10:09 +0000 reply

OK, coming at this from another angle... one of the goals of the Trac TagsPlugin? is that things can be tagged multiply; that is, that any node can exist within a number of different hierarchies. This is, of course, also possible in ZWiki's hierarchy: things can have multiple parents.

So the existing hierarchy and multiple parentage could be the basis for a tag-like system if, as I think Simon suggested, one turned the backlinks (or at least the parents part) into a first-class navigational structure.

BUT, one question bothers me: is there any performance or management hit to ZWiki and its catalog if things are heavily, densely, multiply parented, resulting in a very tangled hierarchy? Anyone have experience with doing that?

Multiple hierarchies --Simon Michael, Sat, 24 Mar 2007 04:23:58 +0000 reply

A little hard to say.. I've tried to avoid tangled hierarchies for the most part, since I was using page hierarchy for grouping and simplifying content, rather than for tagging. These two uses might be in conflict - or not - this reminds me of discussion of "facets", which is worth searching for. I think someone (Bill Page ?) even had a prototype of facet-ish navigation working.

Multiple hierarchies --Simon Michael, Sat, 24 Mar 2007 04:24:59 +0000 reply

PS - but FWIW, I would expect the current code to handle any kind of tangled hierarchy you throw at it without slowdown. Only one way to be sure of course.

Re: tangled hierarchies --Bill Page, Sat, 24 Mar 2007 04:54:14 +0000 reply

I don't think of it in this pejorative manner ;) or even as "multiple hierarchies", rather I prefer to think of is as a topic lattice (in the mathematical sense). There are some initial (also called root or top) nodes (pages) that have no parents and there are some final (bottom) nodes that have no children, with all the other nodes are somewhere in between. These middle nodes all have one or more parents and children.

Parents and children of each node are assigned so that the nodes at the top of the topic lattice are all mostly "high level" and more general, while nodes at a lower level are more specific and detailed. The nodes at the bottom are the most specific. This is the same sort of structure that one might find in a thesaurus.

This is implemented on the Axiom website. See the left sidebar on all pages other than the FrontPage at http://wiki.axiom-developer.org

For example on page:

http://wiki.axiom-developer.org/Aldor

the left sidebar looks like this:

Up

   * AboutAxiom
  o Axiom Language
----------------
  Aldor
----------------

Down

  * AldorForAxiom
        o Interval Arithmetic
        o RandomAlgebra
        o SandBox Aldor Sieve
  * AldorLanguageRestrictions

This structure is defined and changed by clicking BackLinks for the current page.

A prototype --jmax, Thu, 19 Jul 2007 16:30:08 -0700 reply

OK, after some months, I'm ready to talk about this again. On my Zwiki site, http://thinkubator.ccsp.sfu.ca, I've implemented a free-form tagging system using nothing more than the page hierarchy, encouraging multiple-parentage of pages. So far it works quite well. It is based on a little bit of UI that does the following:

  1. Lists existing parents/tags of the current page
  2. Allows a new parent/tag pagename to be entered in a simple field

On the back end, this requires the following:

  1. I'm using the existing pageWithFuzzyName to check if the tag the user typed in corresponds to an existing page. If so, it simply adds that existing page as a new parent.
  2. If pageWithFuzzyName doesn't return anything, there's a 2-step process:
  1. Create a new page with the name the user typed in, as a child/subtopic of a dummy page I called "TagPages?".
  2. Reparent the current context page to the newly created page

Simple enough.

To make it a little more transparent, I modified the show_subtopics code to add an option for a simple one-line-per-item list of all child/subtopic pages... I also madeshow_subtopics settable on a page-by-basis, so some wiki pages look like wiki pages, and some look like lists of other pages.

Last, I did a dead simple tag cloud, based simply on counting subtopics.

It works pretty well, especially as a research/note-taking environment.

The code is fairly simple, and probably not very elegant. It's all python scripts and DTML, as I hate PTs?. If you're interested in seeing it, see TaggingPrototype.

A prototype --Simon Michael, Fri, 20 Jul 2007 09:14:56 -0700 reply

Looks very good John!

A prototype --simon, Sat, 21 Jul 2007 17:05:20 -0700 reply

PS, yes please set up a page describing what you did, when you get a chance.

Tagging Prototype --jmax, Wed, 25 Jul 2007 11:08:29 -0700 reply

OK, here's a full description, at TaggingPrototype.

Tagging alternative --tralala, Fri, 16 Nov 2007 05:44:54 -0800 reply

TaggingSyntax. Still an idea looking for feedback.