Get the plural for the given English word.

@param word The given English word. It can not be {@code null};
@return The plural word.
@see <a href='http://en.wikipedia.org/wiki/English_plurals'>Building English plurals.</a>
549134
public static String pluralize(String word) {
        if (word == null) {
            throw new IllegalArgumentException();
        }

        final String lowerCaseWord = word.toLowerCase();
        if (endsWithAny(lowerCaseWord, "s", "sh", "o")) {
            return word + "es";
        }
        if (lowerCaseWord.endsWith("y") &&
                !lowerCaseWord.endsWith("ay") || endsWithAny(lowerCaseWord, "ey", "oy", "uy")) {
            return word.substring(0, word.length() - 1) + "ies";
        } else {
            return word + "s";
        }
    }
395030
public static function singular($word)
    {
        if(is_array($word)) {
            $keys = array_keys($word);
            $size = sizeof($keys);

            for($i = 0; $i < $size; $i++) {
                $word[$keys[$size]] = Str::singular($word);
            }

            return $word;
        }

        return Inflector::singular($word);
    }
1331220
public static function pluralize($word)
    {
        $lowerCasedWord = strtolower($word);
        foreach (static::$uncountables as $uncountable) {
            if (substr($lowerCasedWord, (-1 * strlen($uncountable))) == $uncountable) {
                return $word;
            }
        }
        foreach (static::$irregulars as $plural => $singular) {
            if (preg_match('/(' . $plural . ')$/i', $word, $arr)) {
                return preg_replace(
                    '/(' . $plural . ')$/i',
                    substr($arr[0], 0, 1) . substr($singular, 1),
                    $word
                );
            }
        }
        foreach (static::$plurals as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                return preg_replace($rule, $replacement, $word);
            }
        }

        return false;
    }
352322
public static Word combine(List<Word> words){
        if(words==null || words.size() < 2){
            return null;
        }
        String key = "";
        for(Word word : words){
            key += word.getText();
            key += " ";
        }
        key=key.trim();
        String value = GENERIC_TRIE.get(key);
        if(value==null){
            return null;
        }
        return new Word(value);
    }
531340
public int indexOf(String word) {
        if (vocabulary.containsKey(word)) {
            return vocabulary.get(word).getHuffmanNode().getIdx();
        } else
            return -1;
    }
898942
public Prep findWord(String word) {
    
    if (prepsMap.containsKey("*")) {
      word = "*";
    }
    
    return prepsMap.get(word);
  }
1160810
public static function plural($word)
    {
        if(is_array($word)) {
            $ret = [];
            foreach($word as $key => $value) {
                $ret[$key] = Str::plural($value);
            }

            return $ret;
        }

        return Inflector::plural($word);
    }
97077
private void addWord(final String word) {

		final int length = word.length();
		if (length >= wordMinLength && length <= wordMaxLength) {

			words.add(word);

			wordCount++;
		}
	}
1100637
public List<CoNLLWord> findChildren(CoNLLWord word)
    {
        List<CoNLLWord> result = new LinkedList<CoNLLWord>();
        for (CoNLLWord other : this)
        {
            if (other.HEAD == word)
                result.add(other);
        }
        return result;
    }
1135145
public function pluralize(string $word, int $number = 2): string
    {
        return abs($number) === 1 ? $word : Inflector::pluralize($word);
    }
370650
public static function pluralize(string $word): string
    {
        if (isset(static::$inflectorCache['pluralize'][$word])) {
            return static::$inflectorCache['pluralize'][$word];
        }

        if (!isset(static::$inflectorCache['irregular']['pluralize'])) {
            static::$inflectorCache['irregular']['pluralize'] = '(?:' . implode('|', array_keys(static::$irregular)) . ')';
        }

        if (preg_match('/(.*?(?:\\b|_))(' . static::$inflectorCache['irregular']['pluralize'] . ')$/i', $word, $regs)) {
            static::$inflectorCache['pluralize'][$word] = $regs[1] . substr($regs[2], 0, 1) .
                substr(static::$irregular[strtolower($regs[2])], 1);

            return static::$inflectorCache['pluralize'][$word];
        }

        if (!isset(static::$inflectorCache['uninflected'])) {
            static::$inflectorCache['uninflected'] = '(?:' . implode('|', static::$uninflected) . ')';
        }

        if (preg_match('/^(' . static::$inflectorCache['uninflected'] . ')$/i', $word, $regs)) {
            static::$inflectorCache['pluralize'][$word] = $word;

            return $word;
        }

        foreach (static::$plural as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                static::$inflectorCache['pluralize'][$word] = preg_replace($rule, $replacement, $word);

                return static::$inflectorCache['pluralize'][$word];
            }
        }

        return $word;
    }
206385
int searchVocab(String word)
    {
        if (word == null) return -1;
        Integer pos = vocabIndexMap.get(word);
        return pos == null ? -1 : pos.intValue();
    }
220599
public static function pluralize($word) {
        if ('' === $word || null === $word) {
            return false;
        }
        $plural = array(
            '/(quiz)$/i'               => '$1zes',
            '/^(ox)$/i'                => '$1en',
            '/([m|l])ouse$/i'          => '$1ice',
            '/(matr|vert|ind)ix|ex$/i' => '$1ices',
            '/(x|ch|ss|sh)$/i'         => '$1es',
            '/([^aeiouy]|qu)ies$/i'    => '$1y',
            '/([^aeiouy]|qu)y$/i'      => '$1ies',
            '/(hive)$/i'               => '$1s',
            '/(?:([^f])fe|([lr])f)$/i' => '$1$2ves',
            '/sis$/i'                  => 'ses',
            '/([ti])um$/i'             => '$1a',
            '/(buffal|tomat)o$/i'      => '$1oes',
            '/(bu)s$/i'                => '$1ses',
            '/(alias|status)/i'        => '$1es',
            '/(octop|vir)us$/i'        => '$1i',
            '/(ax|test)is$/i'          => '$1es',
            '/s$/i'                    => 's',
        );

        $uncountableNouns = [
            'air',
            'anger',
            'beauty',
            'equipment',
            'evidence',
            'fish',
            'information',
            'knowledge',
            'love',
            'money',
            'news',
            'research',
            'rice',
            'safety',
            'series',
            'sheep',
            'species',
            'sugar',
            'tea',
            'water',
        ];

        $irregular = [
            'child'  => 'children',
            'leaf'   => 'leaves',
            'man'    => 'men',
            'move'   => 'moves',
            'person' => 'people',
            'sex'    => 'sexes',
        ];

        $lowerWord = strtolower($word);
        foreach ($uncountableNouns as $noun) {
            if (substr($lowerWord, -strlen($noun)) === $noun) {
                return $word . '_list';
            }
        }

        foreach ($irregular as $_singular => $_plural) {
            $length = strlen($_singular);
            if (substr($lowerWord, -$length) === $_singular) {
                return substr($word, 0, -$length) . $_plural;
            }
        }

        foreach ($plural as $search => $replacement) {
            if (($r = preg_replace($search, $replacement, $word)) !== $word) {
                return $r;
            }
        }
        return $word . 's';
    }
386233
public function toPlural($word)
    {
        // Try to get the cached plural form from the singular.
        $cache = $this->getCachedPlural($word);

        if ($cache !== false) {
            return $cache;
        }

        // Check if the word is a known singular.
        if ($this->getCachedSingular($word)) {
            return false;
        }

        // Compute the inflection.
        $inflected = $this->matchRegexRule($word, 'plural');

        if ($inflected !== false) {
            $this->setCache($word, $inflected);

            return $inflected;
        }

        return false;
    }
1373922
@Nullable
  private String getPastTenseVerbSuggestion(String word) {
    if (word.endsWith("e")) {
      // strip trailing "e"
      String wordStem = word.substring(0, word.length()-1);
      try {
        String lemma = baseForThirdPersonSingularVerb(wordStem);
        if (lemma != null) {
          AnalyzedToken token = new AnalyzedToken(lemma, null, lemma);
          String[] forms = synthesizer.synthesize(token, "VER:3:SIN:PRT:.*", true);
          if (forms.length > 0) {
            return forms[0];
          }
        }
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
    return null;
  }
1226579
public static CoreDictionary.Attribute getAttribute(String word)
    {
        CoreDictionary.Attribute attribute = CoreDictionary.get(word);
        if (attribute != null) return attribute;
        return CustomDictionary.get(word);
    }
425128
public static ArrayList<Word> toUntaggedList(String... words) {
    ArrayList<Word> sent = new ArrayList<Word>();
    for (String str : words) {
      sent.add(new Word(str));
    }
    return sent;
  }