public function daleChallDifficultWordCount($strText = false)
    {
        $strText = $this->setText($strText);
        $intDifficultWords = 0;
        $arrWords = explode(' ', Text::lowerCase(preg_replace('`[^A-za-z\' ]`', '', $strText), $this->strEncoding));

        // Fetch Dale-Chall Words
        $arrDaleChall = Resource::fetchDaleChallWordList();

        for ($i = 0, $intWordCount = count($arrWords); $i < $intWordCount; $i++) {
            // Single letters are counted as easy
            if (strlen(trim($arrWords[$i])) < 2) {
                continue;
            }
            if ((!in_array(Pluralise::getPlural($arrWords[$i]), $arrDaleChall)) && (!in_array(Pluralise::getSingular($arrWords[$i]), $arrDaleChall))) {
                $intDifficultWords++;
            }
        }

        return $intDifficultWords;
    }
public function daleChallDifficultWordCount($strText = false)
    {
        $strText = $this->setText($strText);
        $intDifficultWords = 0;
        $arrWords = explode(' ', Text::lowerCase(preg_replace('`[^A-za-z\' ]`', '', $strText), $this->strEncoding));

        // Fetch Dale-Chall Words
        $arrDaleChall = Resource::fetchDaleChallWordList();

        for ($i = 0, $intWordCount = count($arrWords); $i < $intWordCount; $i++) {
            // Single letters are counted as easy
            if (strlen(trim($arrWords[$i])) < 2) {
                continue;
            }
            if ((!in_array(Pluralise::getPlural($arrWords[$i]), $arrDaleChall)) && (!in_array(Pluralise::getSingular($arrWords[$i]), $arrDaleChall))) {
                $intDifficultWords++;
            }
        }

        return $intDifficultWords;
    }
public function daleChallDifficultWordCount ( $ strText = false ) { $ strText = $ this -> setText ( $ strText ) ; $ intDifficultWords = 0 ; $ arrWords = explode ( ' ' , Text :: lowerCase ( preg_replace ( '`[^A-za-z\' ]`' , '' , $ strText ) , $ this -> strEncoding ) ) ; // Fetch Dale-Chall Words $ arrDaleChall = Resource :: fetchDaleChallWordList ( ) ; for ( $ i = 0 , $ intWordCount = count ( $ arrWords ) ; $ i < $ intWordCount ; $ i ++ ) { // Single letters are counted as easy if ( strlen ( trim ( $ arrWords [ $ i ] ) ) < 2 ) { continue ; } if ( ( ! in_array ( Pluralise :: getPlural ( $ arrWords [ $ i ] ) , $ arrDaleChall ) ) && ( ! in_array ( Pluralise :: getSingular ( $ arrWords [ $ i ] ) , $ arrDaleChall ) ) ) { $ intDifficultWords ++ ; } } return $ intDifficultWords ; }
Returns the number of words NOT on the Dale-Chall easy word list
@param   boolean|string  $strText                  Text to be measured
@return  int
Returns the number of words NOT on the Dale - Chall easy word list