CodeIgniter Forums
AM_Tagcloud, library to compare tagclouds - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: AM_Tagcloud, library to compare tagclouds (/showthread.php?tid=1844)

AM_Tagcloud, library to compare tagclouds - El Forum - 06-30-2007

AM_tagcloud Class
AM_tagcloudclass is a class for the CodeIgniter framework. It contains functions to compare tagclouds both relative (which is the mathematically correct way) and absolute, which basically enables you to do semantic searches. Tagclouds need to be initialized as 2-d arrays: array ( 'element' => weight of element [integer] );.

The function compareTagCloud returns a number between 0 (no match) and 1 (full match).

$example_array_one = array ( 'element_one' => 1, 'element_two' => 1, $element_three' => 4 );
$example_array_two = array ( 'element_one' => 1, 'element_two' => 3, 'element_three' => 6 );

$comparison = compareTagCloud($this->relativeTagCloud($example_array_one), $this->relativeTagCloud($example_array_two));

The AM_tagcloud class is being released under a LGPL license.

Download the latest version of the AM_Tagcloud class here.

There are some comments in the library and an example file (controllers/tagcloud.php) is added to the package, but it's pretty straight forward (and quick & dirty). I'm not very sure if I can support this myself, but you can always post questions in this topic, I might just be able to help you.