Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
58% | Total: 193 | All time: 8,552 This week: 206 |
Version | License | PHP version | Categories | |||
phonetic-algorithms 2.0.9 | MIT/X Consortium ... | 5 | PHP 5, Text processing, Audio |
A phonetic algorithms for the german language via "Kölner Phonetik": en.wikipedia.org/wiki/Cologne_phonetics
A phonetic algorithms for the english language via "metaphone": en.wikipedia.org/wiki/Metaphone
A phonetic algorithms for the french language via "SOUNDEX FR": www.roudoudou.com/phonetic.php
composer require voku/phonetic-algorithms
You the "phonetic_word"-method if you need a fuzzy-search for single words e.g. last-names or product-names.
use voku\helper\Phonetic;
$words = array(
'Moelleken',
'Mölleken',
'Möleken',
'Moeleken',
'Moellecken',
'Möllecken',
'Mölecken',
);
$phonetic = new Phonetic('de');
foreach ($words as $word) {
$phonetic->phonetic_word($string); // '6546'
}
You can use the "phonetic_sentence"-method to process sentences.
use voku\helper\Phonetic;
$string = 'Ein Satz mit vielen Wortern';
$phonetic = new Phonetic('de');
$phonetic->phonetic_sentence($string, (bool) false, (false|int) false);
// [
// 'Ein' => '06',
// 'Satz' => '8',
// 'mit' => '62',
// 'vielen' => '356',
// 'Wortern' => '37276'
// ]
You can use the "phonetic_matches"-method to search for words in an array of words.
use voku\helper\Phonetic;
$phonetic = new Phonetic('de');
$tests = array(
'Moelleken', // '6546',
'Mölleken', // '6546',
'Möleken', // '6546',
'Moeleken', // '6546',
'oder', // '027',
'was', // '38',
'Moellecken', // '6546',
'Möllecken', // '6546',
'Mölecken', // '6546',
);
$phonetic->phonetic_matches('Moelleken', $tests);
// [
// 'Moelleken' => 'Moelleken',
// 'Mölleken' => 'Moelleken',
// 'Möleken' => 'Moelleken',
// 'Moeleken' => 'Moelleken',
// 'Moellecken' => 'Moelleken',
// 'Möllecken' => 'Moelleken',
// 'Mölecken' => 'Moelleken',
// ]
See CHANGELOG for the full history of changes.
Files (25) |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (5 files) | ||||
.editorconfig | Data | Auxiliary data | ||
.scrutinizer.yml | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
.travis.yml | Data | Auxiliary data | ||
CHANGELOG.md | Data | Auxiliary data | ||
circle.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
ISSUE_TEMPLATE.md | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml | Data | Auxiliary data | ||
PULL_REQUEST_TEMPLATE.md | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (25) | / | src | / | voku | / | helper |
File | Role | Description |
---|---|---|
Phonetic.php | Class | Class source |
PhoneticEnglish.php | Class | Class source |
PhoneticExceptionClassNotExists.php | Class | Class source |
PhoneticExceptionLanguageNotExists.php | Class | Class source |
PhoneticFrench.php | Class | Class source |
PhoneticGerman.php | Class | Class source |
PhoneticInterface.php | Class | Class source |
Files (25) | / | tests |
File | Role | Description |
---|---|---|
bootstrap.php | Aux. | Auxiliary script |
EnglishPhoneticAlgorithmsTest.php | Class | Class source |
FrenchPhoneticAlgorithmsTest.php | Class | Class source |
GermanPhoneticAlgorithmsTest.php | Class | Class source |
PhoneticAlgorithmsTest.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
phonetic-algorithms-2018-10-19.zip 26KB | |
phonetic-algorithms-2018-10-19.tar.gz 20KB | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
PHP Stop Words List | .zip .tar.gz | for the stop-words ;) | Required |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.