alshaya/word-count

Get the word count with ranking.

dev-master 2018-01-18 06:33 UTC

This package is not auto-updated.

Last update: 2024-11-10 05:40:33 UTC


README

This module splits the sentence into each words and assign rank based on the no of occurrence.

Steps to use:

  1. Install via composer "composer require alshaya/word-count"
  2. create test file in the root folder. a. include the autoloader to load the class. //require_once DIR . '/vendor/autoload.php'; b. initialize the root class //$instance = new alshaya\WordCount\GetCount(); c. Set the text to be checked //$instance->setText("fsfsf"); d. Call the function which ranks the given text and arguments can be either arrya or json //$result = $instance->getWordRanking("array");