code: public function getWordsByComplexity($string)
      {
          $words = $this->getWords($string);
          $analysis = new FrequencyAnalysis($words);
          $sortedWords = $analysis->getKeyValuesByFrequency();
          $wordsByFrequency = array_unique(array_keys($sortedWords));
  
          usort($wordsByFrequency, function ($a, $b) {
              return strlen($b) - strlen($a);
          });
  
          return $wordsByFrequency;
      }
docs: Get words by complexity.
  
  @param string $string
  
  @return array