original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Plural English word to singularize.
  
  @param string $word Word to singularize.
  
  @return string Singular form of $word.
docstring_tokens: Plural English word to singularize .