Hell Drupalers,

I'm working on a Drupal 5.1 site that will make extensive use of tags, so I need the tagging system to be rock solid. Here's what I've found so far (and what I'm still trying to figure out)

Overview

The site is essentially a group blog. Authors can tag a variety of different type of nodes from a common pool of tags. Authors should be able to encouraged to use existing tags (to discourage duplication), but it should also be easy to create new tags. I also want a simple system of suggesting tags. And, of course, I'd like to use the built-in Free Tagging feature of Categories/Taxonomy so that I can take advantage of the existing tagging modules.

Specifics

Synonyms

I was a bit surprised that the Synonyms field doesn't actually work in Drupal 5.1! I made a simple patch for taxonomy.module so that if a user types in the synonym of a tag, it just links to that root Term for that synonym, which is how I think it should work (before it created an entirely new Term!).

--- orig/taxonomy.module	2007-01-25 16:51:36.000000000 -0500
+++ taxonomy.module	2007-05-09 15:15:12.140625000 -0400
@@ -816,6 +816,12 @@
         // See if the term exists in the chosen vocabulary
         // and return the tid; otherwise, add a new record.
         $possibilities = taxonomy_get_term_by_name($typed_term);
+        
+        //----Added by ESD - 2007-5-9 - Check for synonyms before creating a new term. 
+        $syn_root = taxonomy_get_synonym_root($typed_term);
+        if($syn_root) $possibilities[] = $syn_root;
+        //----
+        
         $typed_term_tid = NULL; // tid match, if any.
         foreach ($possibilities as $possibility) {
           if ($possibility->vid == $vid) {

Suggesting Tags

I've created a simple module that adds a "Suggest Tags" button under every "Tag" input field. It passes the contents of Title and Body fields through the Yahoo Term Extractor (yahoo_terms) and then weights the results based on what keywords have previously been used as tags (the idea here is that tags that have been used more frequently in the past are more likely to be good, but YMMV). I'll post what I have if there's enough interest, but it's a work in progress.

Tag Admin screen

I want an easy, one-click way to say that tag A is a synonym of tag B. It should retag all content tagged "B" with "A," delete tag A, and list A as a synonym of B. Anything like this already out there?

Initial Tag List/Tagging Old Content

I've got a ton of old, untagged content that I'm importing from Drupal 4.6. The plan is to run the Yahoo Term Extractor over all the content and then drop everything except the Top 100 tags (and merge the ones that are synonyms, delete the meaningless ones, etc by hand). A quick proof-of-concept test shows that this works alright. Any other ideas?

Finding "Related Items"

I'd like to have a feature that suggests related nodes. I'm guessing the algorithm will be something like: search for other nodes that have the same tags, and then order by number of matching tags and then by date. (kinda like this snippets). Maybe there's some way to incorporate data from the Search module too?

Comments

michelle’s picture

I'm very interested in this but don't have time to give it a good look right now. Don't want to lose track of the post, so subscribing. :)

Michelle

--------------------------------------
My site: http://shellmultimedia.com

MacRonin’s picture

I'd also like to keep track

-------------------
http://www.PrivacyDigest.com/ News from the Privacy Front
http://www.SunflowerChildren.org/ Helping children around the world

David Latapie’s picture

too

eli’s picture

Ok, I solved the "Tag Admin" problem with a new module: Term Merge.

macm’s picture

Hi,

Term Merge should be the best name for this feature. Very Interesting.

I would like to suggest another approach.

# Synonyms -- Enter synonyms for this term, one synonym per line. Synonyms can be used for variant spellings, acronyms, and other terms that have the same meaning as the added term, but which are not explicitly listed in this thesaurus.

The "term" field have: Related terms(to Child/parents relations) Term name, Description and Synonyms.

I think Synonyms should be a Group of words are Synonym of the main word. Redundant I know But Let see a example.

We can get a list of all occupations from http://www.bls.gov , are thousands and probably every day we have a new one.

So we have main categories like

11-0000 Management Occupations
13-0000 Business and Financial Operations Occupations
15-0000 Computer and Mathematical Occupations
.....

Let say I want make a "Synonym relation" with occupations So I think the best way is into the term "Management Occupations" insert all occupations of "Management Occupations" in "Synonym text area" (one per line)

So if the user type CEO will receive "Management Occupations". If the word "CEO" have in more than one the user can decide which is the best choice.

Some times some lists have 6 or 8 levels of "sub-categories" until the "final term" So You can insert numbers like a Synonym. So If the user just know "sub category code" or "final term code" they can find fast the main category . Occupations is a little example. We can expand this thought to all things. "Buy lists", "Supply chain Lists", "accountant lists' and the traditional country/state/city lists (the user could type the city and you offer the state or the user type Zip code and you offer the street/city/country)

But this feature isnt enable yet. But I think should be. I am not programmer but I hope soon a good guy can do this for us, Drupallists.

Let me know what you think about.

Regards

macm
Mario

abqaria’s picture

subscribed

i just need to limit free tagging

DMG-1’s picture

I think some form of visual tagging would be amazing. IE Tags which are related are visually grouped together.