rap2hpoutre/similar-text-finder
Larablocks Analysis
Compatibility
Trusted maintainerrap2hpoutre/similar-text-finder works with any PHP project: the latest release (1.1.0, Feb 18, 2019) doesn't depend on Laravel.
- Trusted maintainer: rap2hpoutre publishes 9 packages on Larablocks, with 1,356,958 downloads a month between them.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Feb 18, 2019)
- 672 downloads a month (needs 10,000)
- 140 GitHub stars (at least 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Feb 18, 2019.
- No releases in the last 12 months.
- First released: Apr 21, 2015.
- Monthly downloads: 672, up 540% from six months ago.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require rap2hpoutre/similar-text-finder |
|
| Latest Version: | 1.1.0 |
| PHP: | ^7.0 |
| License: | MIT |
| Last Updated: | Sep 1, 2023 |
| Links: | GitHub · Packagist |
Similar Text Finder
TL;DR
Similar text finder. Install via composer, works with any framework: Laravel, Slim, Symfony, etc.

// Init Similar Text Finder with a needle and a haystack
$text_finder = new \SimilarText\Finder('bananna', ['apple', 'banana', 'kiwi']);
// Get first similar word (it's banana)
echo $text_finder->first();
Installation
Install with composer
composer require rap2hpoutre/similar-text-finder.
That's all.
You can now use it in your framework's controller, or wherever you want (you don't need a framework anyway).
Usage
Quick start
Just build a new Similar Text Finder like this:
$tf = new \SimilarText\Finder($needle, $haystack);
$needle may be the user input and $haystack should be an array with all your suggestion. You can display the closest response like this:
echo 'Did you mean ' $tf->first() . ' ?';
Or use it in your favorite template engine (Twig, Blade, etc.)
You can get all your suggestion ordered by most approching words like this:
$all = $tf->all();
Example in raw PHP
use SimilarText\Finder;
// User input with a typo (you could get it from $_GET)
$needle = 'tmatoes';
// Your list (from your database or an API)
$haystack = ['salad', 'tomatoes', 'onions', 'mates'];
// Init Text Finder
$finder = new Finder($needle, $haystack);
// Display all results ordered by the most approching
$results = $finder->all();
echo implode(', ', $results);
// You should see something like "tomatoes, mates, onions, salad", yohoo.
Alternatives to rap2hpoutre/similar-text-finder
A powerful, zero-config fuzzy search package for Laravel with fluent API
Laravel package for fuzzy matching (string similarity) using Levenshtein, Simila...
Hermes - Intelligent text similarity, completion, suggestion and search service...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.1.0 | ^7.0 | MIT | |
| v1.0.0 | ^7.0 | MIT | |
| v0.3.0 | ^7.0 | MIT | |
| v0.2.0 | MIT | ||
| v0.1.2 | MIT | ||
| v0.1.1 | MIT | ||
| v0.1.0 | MIT | ||
| v0.0.1 | MIT |
