@param string $word

@return string[]
489772
private function isReservedWord($word)
    {
        if ($word[0] === '`') {
            $word = str_replace('`', '', $word);
        }

        $keywordLists = [];
        foreach ($this->keywordLists as $keywordList) {
            if (! $keywordList->isKeyword($word)) {
                continue;
            }

            $keywordLists[] = $keywordList->getName();
        }

        return $keywordLists;
    }
347335
public function search(string $word) {
		$index   = $this->addFilter(new Search($word));
		$content = $this->listContents(true);
		$this->removeFilter($index);

		return $content;
	}
1015405
public static function stem($word)
    {
        $nounStem = self::roughStem(
            $word, self::$_nounMay, self::$_nounPre, self::$_nounPost, 
            self::$_nounMaxPre, self::$_nounMaxPost, self::$_nounMinStem
        );
        $verbStem = self::roughStem(
            $word, self::$_verbMay, self::$_verbPre, self::$_verbPost, 
            self::$_verbMaxPre, self::$_verbMaxPost, self::$_verbMinStem
        );
        
        if (mb_strlen($nounStem, 'UTF-8') < mb_strlen($verbStem, 'UTF-8')) {
            $stem = $nounStem;
        } else {
            $stem = $verbStem;
        }
        
        return $stem;
    }
714815
protected function stripTagAttributes($word)
    {
        $space = $this->stringUtil->strpos($word, ' ', 1);

        if ($space) {
            return '<' . $this->stringUtil->substr($word, 1, $space) . '>';
        }

        return trim($word, '<>');
    }
909280
private static function rotate($word){
		$c = $word[0];
		for ($i = 0; $i < 3; $i++)
			$word[$i] = $word[$i+1];
		$word[3] = $c;

		return $word;
	}
664836
public static function oneByWord($word)
	{
		$word = trim($word);
		$word = strtolower($word);

		return self::blank()
			->whereEquals('word', $word)
			->row();
	}
369384
public function grep( $word ) {
		$found = array();
		foreach($this->logs as $log) {
			if (strpos($log,$word)!==false) {
				$found[] = $log;
			}
		}
		return $found;
	}
1130127
public static function capitalize($word) {
        if (is_array($word)) {
            $word = $word[0];
        }

        return str_replace(' ', '', ucwords(str_replace(array('-', '_'), ' ', $word)));
    }
636426
public function searchDirectory(string $word) {
		$index   = $this->addFilter(new Search($word));
		$content = $this->listDirectories(true);
		$this->removeFilter($index);

		return $content;
	}
1058446
protected function singularize($word)
    {
        if (isset($this->singulars[$word])) {
            return $this->singulars[$word];
        }

        foreach ($this->singularRules as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                $this->singulars[$word] = preg_replace($rule, $replacement, $word);
                return $this->singulars[$word];
            }
        }

        $this->singulars[$word] = $word;
        return $word;
    }
245694
private function quoteReservedWord(string $word): string
    {
        if (null === $this->platformReservedWord) {
            try {
                $this->platformReservedWord = $this->connection->getDatabasePlatform()->getReservedKeywordsList();
            } catch (DBALException $exception) {
                // Add the not support key word list, if the platform has not a list of keywords.
                $this->platformReservedWord = new NotSupportedKeywordList();
            }
        }

        if (false === $this->platformReservedWord->isKeyword($word)) {
            return $word;
        }

        return $this->connection->quoteIdentifier($word);
    }
596347
public static function depluralize($word) {
        $rules = array(
            'ss' => false,
            'os' => 'o',
            'ies' => 'y',
            'xes' => 'x',
            'oes' => 'o',
            'ies' => 'y',
            'ves' => 'f',
            'hes' => 'h',
            's' => '');

        foreach(array_keys($rules) as $key) {

            if(substr($word, (strlen($key) * -1)) != $key) {
                continue;
            }

            if($rules[$key] === false) {
                return $word;
            }

            return substr($word, 0, strlen($word) - strlen($key)) . $rules[$key];
        }

        return $word;
    }
1296207
function get_suggestions($word)
    {
        $this->init();

        if (!$this->plink) {
            return array();
        }

        $suggestions = pspell_suggest($this->plink, $word);

        if (count($suggestions) > self::MAX_SUGGESTIONS)
            $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);

        return is_array($suggestions) ? $suggestions : array();
    }
314084
public String[] getParams(String word) {
        for (Forest forest : forests) {
            if (forest == null) {
                continue;
            }
            SmartForest<String[]> sf = forest;
            for (int i = 0; i < word.length(); i++) {
                sf = sf.get(word.charAt(i));
                if (sf == null) {
                    return null;
                }
            }
            if (sf.getStatus() > 1) {
                return sf.getParam();
            } else {
                return null;
            }
        }
        return null;
    }
180508
public static function Stem($word)
    {
        if (strlen($word) <= 2) {
            return $word;
        }

        $word = self::step1ab($word);
        $word = self::step1c($word);
        $word = self::step2($word);
        $word = self::step3($word);
        $word = self::step4($word);
        $word = self::step5($word);

        return $word;
    }
810454
protected static function toSimpleL33t($word)
	{
		$subs = array(
			'4' => 'A',
			'@' => 'A',
			'^' => 'A',
			'8' => 'B',
			'(' => 'C',
			'{' => 'C',
			'<' => 'C',
			')' => 'D',
			'3' => 'E',
			'6' => 'G',
			'9' => 'G',
			'&' => 'G',
			'#' => 'H',
			'1' => 'I',
			'!' => 'I',
			//'|' => 'I',
			'|' => 'L',
			'1' => 'L',
			'~' => 'N',
			'0' => 'O',
			'*' => 'O',
			'5' => 'S',
			'$' => 'S',
			'7' => 'T',
			'+' => 'T',
			'%' => 'Y',
			'2' => 'Z',
		);

		$word2 = str_replace(array_keys($subs), array_values($subs), $word);

		return strtolower($word2);
	}
1030005
static public function underscore($word)
 	{
 		$let = strtolower(substr($word,0,1));
 		$word = $let.substr($word,1);
		$word = preg_replace('/([A-Z])/', '_\\1', $word);
		return strtolower($word);
	}