dev-master
9999999-dev https://github.com/andela-araimi/Checkpoint-one.gitA package that helps in managing urban words (slang)
MIT
The Requires
- php >=5.5.9
- satooshi/php-coveralls ^1.0
The Development Requires
by Raimi Ademola
urban words
Wallogit.com
2017 © Pedro Peláez
A package that helps in managing urban words (slang)
The Urban dictionary is the collation of urban words. It is a package that stores meaning and usage of words in a multi associative array. The package allows for addition, editing, updating and retrieving of words in the dictionary., (*2)
Classes, (*3)
UrbanWords: Contains an array where urban words are stored., (*4)
DictionaryEngine: Contain methods that add new word, retrieve the whole dictionary, retrieve word, update existing word, and delete word in the urban dictionary., (*5)
RankWord: Contain methods that rank words based on the number of times they occurred in the sentence., (*6)
To install this package, PHP 5.5+ and composer are required. After these requirements have been met, type the following code, (*7)
$ composer require demola/urbandictionary
The dictionary contains urban words with their meaning and usage, (*8)
Create a dictionaryManager instance, (*9)
$dictionaryManager = new DictionaryEngine();
Add urban words to the dictionary, (*10)
$dictionaryManager->add('word', 'description', 'sampleSentence'); // This returns true
Retrieve a word from the dictionary, (*11)
$data = $dictionaryManager->retrieve('word');
Retrieve the whole dictionary, (*12)
$data = $dictionaryManager->retrieveAll();
Update a word, its meaning and its sample sentence, (*13)
$data = $dictionaryManager->update('word', newDescription', 'newSampleSentence');
Delete a word in the urban dictionary, (*14)
$dictionaryManager->delete('word'); // This returns true
Rank words in a sentence, (*15)
create a wordOccurence instance, (*16)
$wordOccurence = new RankWord; $ranking = $wordOccurence->rankWord($word));
Run the following command in the urban-dictionary directory:, (*17)
~ phpunit
Please check out CHANGELOG file for information on what has changed recently., (*18)
Please check out CONTRIBUTING file for detailed contribution guidelines., (*19)
If you discover any issue, kindly contact ademola.raimi@andela.com, (*20)
Urban Dictionary is maintained by Raimi Ademola., (*21)
UrbanDictionary is released under the MIT Licence. See the bundled LICENSE file for more details., (*22)
A package that helps in managing urban words (slang)
MIT
urban words