DaveChild\TextStatistics\Text::averageWordsPerSentence PHP Method

averageWordsPerSentence() public static method

Returns average words per sentence for text.
public static averageWordsPerSentence ( string $strText, string $strEncoding = '' ) : integer | float
$strText string Text to be measured
$strEncoding string Encoding of text
return integer | float
    public static function averageWordsPerSentence($strText, $strEncoding = '')
    {
        $intSentenceCount = self::sentenceCount($strText, $strEncoding);
        $intWordCount = self::wordCount($strText, $strEncoding);
        $averageWords = Maths::bcCalc($intWordCount, '/', $intSentenceCount);
        return $averageWords;
    }