src/Linguistics.php
public function getWords($string, $minLength = null)
    {
        $tokenizer = new Whitespace();
        $words = $tokenizer->tokenize($string);

        if (!is_null($minLength)) {
            foreach ($words as $key => $word) {
                if (strlen($word) <= $minLength) {
                    unset($words[$key]);
                }
            }
        }

        return array_values($words);
    }
public function getWords($string, $minLength = null)
    {
        $tokenizer = new Whitespace();
        $words = $tokenizer->tokenize($string);

        if (!is_null($minLength)) {
            foreach ($words as $key => $word) {
                if (strlen($word) <= $minLength) {
                    unset($words[$key]);
                }
            }
        }

        return array_values($words);
    }
public function getWords ( $ string , $ minLength = null ) { $ tokenizer = new Whitespace ( ) ; $ words = $ tokenizer -> tokenize ( $ string ) ; if ( ! is_null ( $ minLength ) ) { foreach ( $ words as $ key => $ word ) { if ( strlen ( $ word ) <= $ minLength ) { unset ( $ words [ $ key ] ) ; } } } return array_values ( $ words ) ; }
Get words in a string.

@param string $string
@param int    $minLength

@return array
Get words in a string .