PHPackages                             jelmerv-wfc/laravel-string-similarities-laravel-6 - 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. jelmerv-wfc/laravel-string-similarities-laravel-6

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

jelmerv-wfc/laravel-string-similarities-laravel-6
=================================================

Compare two string and get a similarity percentage

0195PHPCI failing

Since May 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/JelmerV-WFC/laravel-string-similarities-laravel-6)[ Packagist](https://packagist.org/packages/jelmerv-wfc/laravel-string-similarities-laravel-6)[ RSS](/packages/jelmerv-wfc-laravel-string-similarities-laravel-6/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-string-similarities
===========================

[](#laravel-string-similarities)

[![Latest Stable Version](https://camo.githubusercontent.com/6de45fde612f9c6c8f76e212e2a6b043883b27d5f364370224315ae42079469d/68747470733a2f2f706f7365722e707567782e6f72672f61746f6d657363726f636875732f6c61726176656c2d737472696e672d73696d696c617269746965732f762f737461626c65)](https://packagist.org/packages/atomescrochus/laravel-string-similarities)[![License](https://camo.githubusercontent.com/27ab8e1cbe5fbf994d7dcb0499b651308909fa54809179394499061244fb125b/68747470733a2f2f706f7365722e707567782e6f72672f61746f6d657363726f636875732f6c61726176656c2d737472696e672d73696d696c617269746965732f6c6963656e7365)](https://packagist.org/packages/atomescrochus/laravel-string-similarities)[![Total Downloads](https://camo.githubusercontent.com/858533ca0dd8eb074a8a64bce5623497faeb60a1bef5c2e64b37efcf44498eec/68747470733a2f2f706f7365722e707567782e6f72672f61746f6d657363726f636875732f6c61726176656c2d737472696e672d73696d696c617269746965732f646f776e6c6f616473)](https://packagist.org/packages/atomescrochus/laravel-string-similarities)

Compare two string and get a similarity percentage. Note that I did not write the algorithms myself, see down this document for the full credits.

Some methods are usable in production, some are not, see usage for informations. Pull requests are more than welcomed!

Install
-------

[](#install)

You can install this package via composer:

```
$ composer require atomescrochus/laravel-string-similarities
```

Then you have to install the package' service provider, *unless you are running Laravel &gt;=5.5* (it'll use package auto-discovery) :

```
// config/app.php
'providers' => [
    ...
    Atomescrochus\StringSimilarities\StringSimilaritiesServiceProvider::class,
];
```

Usage
-----

[](#usage)

```
$comparison = new \Atomescrochus\StringSimilarities\Compare();

// the functions returns similarity percentage between strings
$jaroWinkler = $comparison->jaroWinkler('first string', 'second string'); // JaroWinkler comparison
$levenshtein = $comparison->levenshtein('first string', 'second string'); // Levenshtein comparison
$smg = $comparison->smg('first string', 'second string'); // Smith Waterman Gotoh comparison
$similar = $comparison->similarText('first string', 'second string'); // Using "similar_text()"

// This next one will return an array containing the results of all working comparison methods
// plus an array of 'data' that includes the first and second string, and the time in second it took to run all
// comparison. BE AWARE that comparing long string can results in really long compute time!
$all = $comparison->all('first string', 'second string');
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

HELP NEEDED.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jean-Philippe Murray](https://github.com/jpmurray/)
- [joshweir over StackOverflow](http://stackoverflow.com/a/38236357/1001942) for pointing me to the solutions and algorithms for the Jaro Winkler and Smith Waterman Gotoh comparison
- [All Contributors](https://github.com/atomescrochus/laravel-string-similarities/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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/a8d0bd4d1a04d23ea40737394ae6fa1582f4b35276963fb2bf7de3ef838cee0b?d=identicon)[JelmerV-WFC](/maintainers/JelmerV-WFC)

---

Top Contributors

[![JelmerV-WFC](https://avatars.githubusercontent.com/u/39594925?v=4)](https://github.com/JelmerV-WFC "JelmerV-WFC (4 commits)")

### Embed Badge

![Health badge](/badges/jelmerv-wfc-laravel-string-similarities-laravel-6/health.svg)

```
[![Health](https://phpackages.com/badges/jelmerv-wfc-laravel-string-similarities-laravel-6/health.svg)](https://phpackages.com/packages/jelmerv-wfc-laravel-string-similarities-laravel-6)
```

###  Alternatives

[jcergolj/brevo-webhook-manager-for-laravel

Brevo webhook manager for Laravel

207.5k](/packages/jcergolj-brevo-webhook-manager-for-laravel)

PHPackages © 2026

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