DaveChild\TextStatistics\Syllables::percentageWordsWithThreeSyllables PHP Метод

percentageWordsWithThreeSyllables() публичный статический Метод

Returns the percentage of words with more than three syllables
public static percentageWordsWithThreeSyllables ( string $strText, boolean $blnCountProperNouns = true, $strEncoding = '' ) : integer | float
$strText string Text to be measured
$blnCountProperNouns boolean Boolean - should proper nouns be included in words count
Результат integer | float
    public static function percentageWordsWithThreeSyllables($strText, $blnCountProperNouns = true, $strEncoding = '')
    {
        $intWordCount = Text::wordCount($strText, $strEncoding);
        $intLongWordCount = self::wordsWithThreeSyllables($strText, $blnCountProperNouns, $strEncoding);
        $intPercentage = Maths::bcCalc(Maths::bcCalc($intLongWordCount, '/', $intWordCount), '*', 100);
        return $intPercentage;
    }