public static function wordsWithThreeSyllables($strText, $blnCountProperNouns = true, $strEncoding = '')
{
$intLongWordCount = 0;
$intWordCount = Text::wordCount($strText, $strEncoding);
$arrWords = explode(' ', $strText);
for ($i = 0; $i < $intWordCount; $i++) {
if (Syllables::syllableCount($arrWords[$i], $strEncoding) > 2) {
if ($blnCountProperNouns) {
$intLongWordCount++;
} else {
$strFirstLetter = Text::substring($arrWords[$i], 0, 1, $strEncoding);
if ($strFirstLetter !== Text::upperCase($strFirstLetter, $strEncoding)) {
// First letter is lower case. Count it.
$intLongWordCount++;
}
}
}
}
return $intLongWordCount;
}