Skip to content

felipecwb/soundslike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sounds Like

PHP Sounds Like Text Search

composer require "felipecwb/soundslike"

It's looks like that:

use Felipecwb\SoundsLike\TextSearch;

$search = new TextSearch([
    "São Paulo - SP",
    "Osasco - SP",
    "Curitiba - PR",
    "Curitibanos - SC",
    "Vitória - ES",
    "Rio de Janeiro - RJ",
    "Natal - RN"
]);

// find for the best matching text
$result = $search->findBestMatch('Sao paulo');

$result->getPhrase(); //São Paulo - SP
$result->getAgainst(); //Sao paulo
$result->getSimilarity(); //7

About

PHP Sounds Like Text Search

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages