コード例 #1
0
 /**
  * Constructor loads the ruleset into memory
  * @param array $ruleSet the set of rules that will be used by the lancaster algorithm. if empty 
  * this will use the default ruleset embedded in the LancasterStemmer
  */
 public function __construct($ruleSet = array())
 {
     //setup the default rule set
     if (empty($ruleSet)) {
         $ruleSet = LancasterStemmer::getDefaultRuleSet();
     }
     $this->indexRules($ruleSet);
     //only get the english vowel checker
     $this->vowelChecker = VowelsAbstractFactory::factory("English");
 }
コード例 #2
0
 public function testYIsVowel()
 {
     $vowelChecker = VowelsAbstractFactory::factory("English");
     $this->assertTrue($vowelChecker->isVowel("try", 2));
 }