AM_tagcloud class 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.
Check the support thread for news, questions & updates