public function singularize($word)
    {
        if ($singular = $this->getCache($word, 'singularize')) {
            return $singular;
        }

        if (isset($this->_uncountables_keys[$word])) {
            return $word;
        }

        foreach ($this->_singularizationRules as $regexp => $replacement) {
            $singular = preg_replace($regexp, $replacement, $word, -1, $matches);
            if ($matches > 0) {
                return $this->setCache($word, 'singularize', $singular);
            }
        }

        return $this->setCache($word, 'singularize', $word);
    }
public function singularize($word)
    {
        if ($singular = $this->getCache($word, 'singularize')) {
            return $singular;
        }

        if (isset($this->_uncountables_keys[$word])) {
            return $word;
        }

        foreach ($this->_singularizationRules as $regexp => $replacement) {
            $singular = preg_replace($regexp, $replacement, $word, -1, $matches);
            if ($matches > 0) {
                return $this->setCache($word, 'singularize', $singular);
            }
        }

        return $this->setCache($word, 'singularize', $word);
    }
public function singularize ( $ word ) { if ( $ singular = $ this -> getCache ( $ word , 'singularize' ) ) { return $ singular ; } if ( isset ( $ this -> _uncountables_keys [ $ word ] ) ) { return $ word ; } foreach ( $ this -> _singularizationRules as $ regexp => $ replacement ) { $ singular = preg_replace ( $ regexp , $ replacement , $ word , - 1 , $ matches ) ; if ( $ matches > 0 ) { return $ this -> setCache ( $ word , 'singularize' , $ singular ) ; } } return $ this -> setCache ( $ word , 'singularize' , $ word ) ; }
Plural English word to singularize.

@param string $word Word to singularize.

@return string Singular form of $word.
Plural English word to singularize .