usama-ashraf / wordranker
根据给定标准对单词进行排名
dev-master
2017-02-28 14:14 UTC
Requires
- php: >=5.5.9
This package is not auto-updated.
Last update: 2024-09-28 20:35:39 UTC
README
PHP单词排名器
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
]
**/