kidata - 2009-02-06 11:23:33
I think the hard coded common word list at line 135 should be moved to the class vars and there should be get/set-methods for easy modifying the common word list for other languages than english, without changing the class.
how about that?
class autokeyword {
//...
var $commons = array("able", "about", ...
//...
function parse_words()
{
$common = $this->commons;
// ...
function get_common_words()
{
return $this->commons;
}
function set_common_words($wordlist)
{
if (is_array($wordlist))
$this->commons = $wordlist;
else
return false;
}
function add_common_words($wordlist)
{
if (is_array($wordlist))
$this->commons = array_merge($this->commons, $wordlist);
else
return false;
}