PHP code example of kudashevs / keywords-extractor
1. Go to this page and download the library: Download kudashevs/keywords-extractor library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kudashevs / keywords-extractor example snippets
use Kudashevs\KeywordsExtractor\KeywordsExtractor;
$extractor = new KeywordsExtractor([
'add_words' => 'some',
'remove_words' => 'interesting'
]);
$keywords = $extractor->extract('this is some interesting text');
print_r($keywords); // some, text
use Kudashevs\KeywordsExtractor\KeywordsExtractor;
$extractor = new KeywordsExtractor();
$keywords = $extractor->addWords(['this', 'example'])
->extract('this is a usage example');
print_r($keywords); // usage example, this