PHPackages                             florence/dictionary - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. florence/dictionary

AbandonedArchivedProject[Utility &amp; Helpers](/categories/utility)

florence/dictionary
===================

An urban dictionary agnostic of common slangs and their meanings

20PHP

Since Aug 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fokosun/Checkpoint1)[ Packagist](https://packagist.org/packages/florence/dictionary)[ RSS](/packages/florence-dictionary/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/d20f0107d80ea7ceedcb5ba340050a15f4c6d25b6092a70903c33acf9758fa81/68747470733a2f2f7472617669732d63692e6f72672f666f6b6f73756e2f436865636b706f696e74312e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fokosun/Checkpoint1)

Checkpoint One
==============

[](#checkpoint-one)

This package was built mainly for academic purposes. It can be described ad an agnostic package that conforms with thephpleague.com specifications and uses the Test Driven Development process (PHPUnit)

Classes
-------

[](#classes)

- Data: The main dictionary, a static associative array that contains urban words
- Dictionary: CRUD implementations and Ranking System Implementation.
- WordExistsException: Returns the associated exception message
- WordNotFoundException: Returns the associated exception message

Installation
------------

[](#installation)

Require via composer like so:

```
    composer require florence/dictionary

```

Usage
-----

[](#usage)

```
    $dictionary = Data::$data;

    $dictionary = new Dictionary($dictionary);

```

### Add Slang

[](#add-slang)

```
    $dictionary->addSlang($slang, $description, $sentence);

```

### Retrieve Slang

[](#retrieve-slang)

```
    $dictionary->findOne($slang);

    $dictionary->findAll();

```

### Update Slang

[](#update-slang)

```
    $dictionary->updateSlang($slang, $description, $sentence);

```

### Delete Slang

[](#delete-slang)

```
    $dictionary->deleteOne($slang);

    $dictionary->deleteAll();

```

### Implement Ranking

[](#implement-ranking)

The ranking system is implemented using the `rankWords()` method.

You can now traverse through the Data array to get your desired output like so:

```
foreach(Data::$data as $row => $innerArray)
{

    $res = $innerArray['Sample-sentence'];

    $getRank = $ranker->rankAndSort($res);

    $output = '';

        foreach($getRank as $key => $value)
        {
            $output .= "$key => $value".', ';
        }

        $output = rtrim("[".$output,','."]")."";

        // print the final output

        echo $output;
        echo "";
}

```

Sample Output:

```
[“Tight” => 3, “Prosper” => 2, “Yes” => 1, “Have” => 1, “you” => 1, “finished” => 1, “the” => 1, “curriculum?” => 1]

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a6cc40b038a8d47c9ce56d2f3fd2db84d4f4b606403e65c2087416663c05796?d=identicon)[florenxe](/maintainers/florenxe)

---

Top Contributors

[![fokosun](https://avatars.githubusercontent.com/u/7254731?v=4)](https://github.com/fokosun "fokosun (133 commits)")

### Embed Badge

![Health badge](/badges/florence-dictionary/health.svg)

```
[![Health](https://phpackages.com/badges/florence-dictionary/health.svg)](https://phpackages.com/packages/florence-dictionary)
```

###  Alternatives

[beechit/news-ttnewsimport

Importer of ext:tt\_news items to ext:news

2012.6k](/packages/beechit-news-ttnewsimport)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
