https://github.com/felipecwb/soundslike
PHP Sounds Like Text Search
https://github.com/felipecwb/soundslike
php search-in-text
Last synced: 3 months ago
JSON representation
PHP Sounds Like Text Search
- Host: GitHub
- URL: https://github.com/felipecwb/soundslike
- Owner: felipecwb
- License: mit
- Created: 2016-11-18T13:35:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-18T17:57:28.000Z (almost 9 years ago)
- Last Synced: 2025-06-09T06:44:27.446Z (4 months ago)
- Topics: php, search-in-text
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sounds Like
PHP Sounds Like Text Search`composer require "felipecwb/soundslike"`
It's looks like that:
```phpuse 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
```