10 defined(
'JPATH_PLATFORM') or die;
27 protected $cache = array();
33 protected static $instances = array();
45 public static function getInstance($adapter)
48 if (isset(self::$instances[$adapter]))
50 return self::$instances[$adapter];
54 $class =
'JLanguageStemmer' . ucfirst(trim($adapter));
57 if (!class_exists($class))
60 throw new RuntimeException(
JText::sprintf(
'JLIB_STEMMER_INVALID_STEMMER', $adapter));
63 self::$instances[$adapter] =
new $class;
65 return self::$instances[$adapter];
78 abstract public function stem($token, $lang);