usama-ashraf / wordranker
Ranks words according to a given criteria
dev-master
2017-02-28 14:14 UTC
Requires
- php: >=5.5.9
This package is not auto-updated.
Last update: 2026-03-15 04:38:58 UTC
README
PHP Word Ranker
composer require usama-ashraf/wordranker
use Wordranker\Clients\WordRankerClient;
$text = 'a quick brown fox jump over the';
$blacklist = ['a' , 'over', 'the'];
$ranker = new WordRankerClient($text, $blacklist, '/[a-z]/');
$words = $ranker->rank();
/**
[
'quick' => 0.0,
'brown' => 0.0,
'fox' => 0.0,
'jump' => 0.0
]
**/