Get echo word length and use md5 as key.

@param array $words

@return array
163789
protected function wordsLength(array $words)
    {
        $length = [];

        foreach ($words as $word) {
            $pinyin = $this->pinyin->sentence($word);

            $length[md5($pinyin)] = ($pinyin === $word)
                ? 1
                : mb_strlen($word);
        }

        arsort($length);

        return $length;
    }
403616
public function getWords()
    {
        if ($this->words === null) {
            $this->words = array_map(
                function ($chunk) {
                    return hexdec($chunk);
                },
                explode(':', $this->longAddress)
            );
        }

        return $this->words;
    }
1054822
private function buildSearchQuery(array $words)
    {
        $qb = $this->app->make(PackageRepository::class)->createQueryBuilder('p');
        $expr = $qb->expr();
        $orFields = $expr->orX();
        foreach (['p.handle', 'p.name'] as $fieldName) {
            $and = $expr->andX();
            foreach ($words as $word) {
                $and->add($expr->like($fieldName, $expr->literal('%' . $word . '%')));
            }
            $orFields->add($and);
        }
        $qb->where($orFields);
        if ($this->maximumSearchResults) {
            $qb->setMaxResults($this->maximumSearchResults);
        }

        return $qb;
    }
747603
function _subWord($word)
    {
        static $sbox;
        if (empty($sbox)) {
            list(, , , , $sbox) = $this->_getTables();
        }

        return  $sbox[$word       & 0x000000FF]        |
               ($sbox[$word >>  8 & 0x000000FF] <<  8) |
               ($sbox[$word >> 16 & 0x000000FF] << 16) |
               ($sbox[$word >> 24 & 0x000000FF] << 24);
    }
1338159
protected function getWordIndex($word, $offset)
    {
        $index = mb_strpos($this->title, $word, $offset, $this->encoding);
        return $this->correctIndexOffset($index);
    }
591993
private function read(int $words, int $wordLength) : string
    {
        $length = $words * $wordLength;

        if ($this->position + $length > $this->length) {
            throw GeometryIOException::invalidWKB('unexpected end of stream');
        }

        if ($length === 1) {
            return $this->wkb[$this->position++];
        }

        if ($this->invert) {
            $data = '';

            for ($i = 0; $i < $words; $i++) {
                $data .= strrev(substr($this->wkb, $this->position + $i * $wordLength, $wordLength));
            }
        } else {
            $data = substr($this->wkb, $this->position, $length);
        }

        $this->position += $length;

        return $data;
    }
1015305
protected function _buildMigrationName(array $words)
    {
        $sMigrationName = '';

        foreach ($words as $word) {

            if (!$word) {
                continue;
            }

            $sMigrationName .= ucfirst($word);
        }

        return $sMigrationName;
    }
1201397
public static function match($text, array $words)
    {
        foreach ($words as $word) {
            if (false !== mb_strpos($text, $word)) {
                return true;
            }
        }

        return false;
    }
502189
function &checkWords($lang, $words) {
		$r = enchant_broker_init();
		
		if (enchant_broker_dict_exists($r,$lang)) {
			$d = enchant_broker_request_dict($r, $lang);
			
			$returnData = array();
			foreach($words as $key => $value) {
				$correct = enchant_dict_check($d, $value);
				if(!$correct) {
					$returnData[] = trim($value);
				}
			}
	
			return $returnData;
			enchant_broker_free_dict($d);
		} else {

		}
		enchant_broker_free($r);
	}
269593
private function getMissing(array $languages)
    {
        $files = $this->manager->files();

        // Array of content of all files indexed by fileName.languageKey
        $filesResults = [];

        // The final output of the method
        $missing = [];

        // Here we collect the file results
        foreach ($files as $fileName => $languageFiles) {
            foreach ($languageFiles as $languageKey => $filePath) {
                $filesResults[$fileName][$languageKey] = $this->manager->getFileContent($filePath);
            }
        }

        $values = Arr::dot($filesResults);

        $emptyValues = array_filter($values, function ($value) {
            return $value == '';
        });

        // Adding all keys that has values = ''
        foreach ($emptyValues as $dottedValue => $emptyValue) {
            list($fileName, $languageKey, $key) = explode('.', $dottedValue, 3);

            $missing[] = "{$fileName}.{$key}:{$languageKey}";
        }

        $missing = array_merge($missing, $this->manager->getKeysExistingInALanguageButNotTheOther($values));

        return $missing;
    }
815979
public function delete($words)
    {
        $request = new DeleteDirtyWordRequest($words);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
75932
public static function rtrimWord($string, $word)
    {
        $end = mb_substr($string, 0-mb_strlen($word));
        if ($end != $word) {
            return $string;
        }
        return mb_substr($string, 0, mb_strlen($string)-mb_strlen($word));
    }
762888
protected function serializeWord(array $word): string
    {
        if (!isset($word['type'][0]) || $word['type'][0] !== 'selection') {
            $answers = $this->getOrderedAnswers($word);
            if ($answers) {
                $output = implode(',', array_map((function (string $answer, int $key): string {
                    $lowercase = strtolower($answer);
                    if ($key === 0) {
                        $serializedAnswer[] = $this->convertToFullwidth($lowercase);
                    }
                    if ($key > 0 || $serializedAnswer[0] !== $lowercase) {
                        $serializedAnswer[] = str_replace([',', '/', ';', '['], ['，', '／', '；', '［'], $lowercase);
                    }
                    return implode(',', $serializedAnswer);
                }), $answers, array_keys($answers)));
                
                $comment = '';
                if (isset($word['answer'][0])) {
                    $shiftJISableText = $this->convertToShiftJISable($word['text'][0]);
                    if ($answers[0] !== $shiftJISableText && $this->isShiftJISable($shiftJISableText)) {
                        $comment .= "【${shiftJISableText}】";
                    }
                }
                if (isset($word['description'][0])) {
                    $shiftJISableDescription = $this->convertToShiftJISable($word['description'][0]['lml']);
                    if ($this->isShiftJISable($shiftJISableDescription)) {
                        $comment .= $shiftJISableDescription;
                    }
                }
                if ($comment !== '') {
                    $output .= "// " . str_replace("\n", ' ', $comment);
                }
                $output .= "\r\n";
            }
        }
        
        if (!isset($output)) {
            $output = '';
            $this->logUnserializableError('きゃっちま', $word);
        }
        return $output;
    }
1106735
public function getTextLength($text) {
        $colorsList = array('0;30', '1;30', '0;34', '1;34', '0;32', '1;32', '0;36', '1;36', '0;31', '1;31', '0;35', '1;35', '0;33', '1;33', '0;37', '1;37', '40', '41', '42', '43', '44', '45', '46', '47', '0');
        foreach ($colorsList as $color) {
            $text = str_replace("\033[" . $color . "m", '', $text);
        }
        return strlen($text);
    }
258295
private static function getTranslations(array $words)
    {
        $result = array();
        foreach ($words as $i) {
            $result = array_merge($result, array(ucfirst($i), strtoupper($i), strtolower($i)));
        }

        return $result;
    }
327515
public static function shuffleWords($words)
    {
        $wordParts = explode(' ', trim($words));

        $wordPartsLen = count($wordParts);

        $rand = [];

        do {
            $r = rand(0, $wordPartsLen - 1);

            if (!in_array($r, $rand)) {
                $rand[] = $r;
            }
        } while (count($rand) != $wordPartsLen);

        $sentence = '';

        foreach ($rand as $word) {
            $sentence .= $wordParts[$word] . ' ';
        }

        return trim($sentence);
    }
1255087
protected function createIsolatedDiffTagPlaceholders(&$words)
    {
        $openIsolatedDiffTags = 0;
        $isolatedDiffTagIndices = array();
        $isolatedDiffTagStart = 0;
        $currentIsolatedDiffTag = null;
        foreach ($words as $index => $word) {
            $openIsolatedDiffTag = $this->isOpeningIsolatedDiffTag($word, $currentIsolatedDiffTag);
            if ($openIsolatedDiffTag) {
                if ($this->isSelfClosingTag($word) || $this->stringUtil->stripos($word, '<img') !== false) {
                    if ($openIsolatedDiffTags === 0) {
                        $isolatedDiffTagIndices[] = array(
                            'start' => $index,
                            'length' => 1,
                            'tagType' => $openIsolatedDiffTag,
                        );
                        $currentIsolatedDiffTag = null;
                    }
                } else {
                    if ($openIsolatedDiffTags === 0) {
                        $isolatedDiffTagStart = $index;
                    }
                    ++$openIsolatedDiffTags;
                    $currentIsolatedDiffTag = $openIsolatedDiffTag;
                }
            } elseif ($openIsolatedDiffTags > 0 && $this->isClosingIsolatedDiffTag($word, $currentIsolatedDiffTag)) {
                --$openIsolatedDiffTags;
                if ($openIsolatedDiffTags == 0) {
                    $isolatedDiffTagIndices[] = array('start' => $isolatedDiffTagStart, 'length' => $index - $isolatedDiffTagStart + 1, 'tagType' => $currentIsolatedDiffTag);
                    $currentIsolatedDiffTag = null;
                }
            }
        }
        $isolatedDiffTagScript = array();
        $offset = 0;
        foreach ($isolatedDiffTagIndices as $isolatedDiffTagIndex) {
            $start = $isolatedDiffTagIndex['start'] - $offset;
            $placeholderString = $this->config->getIsolatedDiffTagPlaceholder($isolatedDiffTagIndex['tagType']);
            $isolatedDiffTagScript[$start] = array_splice($words, $start, $isolatedDiffTagIndex['length'], $placeholderString);
            $offset += $isolatedDiffTagIndex['length'] - 1;
        }

        return $isolatedDiffTagScript;
    }