usama-ashraf/wordranker

Ranks words according to a given criteria

Maintainers

Package info

github.com/UsamaAshraf/wordranker

pkg:composer/usama-ashraf/wordranker

Statistics

Installs: 2 298

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

dev-master 2017-02-28 14:14 UTC

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
  ] 
**/