code: public function getKeywords($string, $amount = 10)
      {
          $words = $this->getWords($string);
  
          $analysis = new FrequencyAnalysis($words);
  
          $keywords = $analysis->getKeyValuesByFrequency();
  
          return array_slice($keywords, 0, $amount);
      }
docs: Get keywords.
  
  @param string $string
  @param int    $amount
  
  @return array