Requirements: When doing SEO keywords, you need to extract keywords from the title or text

1.PHPAnalysis download address

https://github.com/feixuekeji/PHPAnalysis

After downloading, unzip and place it in the extend directory (tp5 is used as an example, other directories are also acceptable)

2.Package

LoadDict ();
        $pa->SetSource ($content);
        $pa->StartAnalysis (true);
 
        $tags = $pa->GetFinallyKeywords ($num); // Get n keywords in the article
        return $tags;//Return keywords
    }
 
}


Use

$data['seo']['keyword'] = Analysis::getKeywords($article_info['title']);