function cvc in Porter-Stemmer 5
Same name and namespace in other branches
- 6 porterstemmer.module \cvc()
Checks for ending CVC sequence where second C is not W, X or Y
Parameters
string $str String to check:
Return value
bool Result
2 calls to cvc()
- step1ab in ./
porterstemmer.module - Step 1
- step5 in ./
porterstemmer.module - Step 5
File
- ./
porterstemmer.module, line 413
Code
function cvc($str) {
$c = regex_consonant;
$v = regex_vowel;
return preg_match("#({$c}{$v}{$c})\$#", $str, $matches) and strlen($matches[1]) == 3 and $matches[1][2] != 'w' and $matches[1][2] != 'x' and $matches[1][2] != 'y';
}