Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (17) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2020-11-24 (23 days ago) | Not yet rated by the users | Total: 17 This week: 3 | All time: 10,130 This week: 60 |
Version | License | PHP version | Categories | |||
metaphone 1.0 | MIT/X Consortium ... | 5 | Algorithms, PHP 5, Text processing, A... |
Description | Author | |||
This package is specific mainly for applications used in Russian Federation .
This package can generate a phonetic representation of Russian word. Innovation Award
|
|
port of ruby's https://github.com/pavlo/russian_metaphone
https://en.wikipedia.org/wiki/Metaphone
see http://forum.aeroion.ru/topic461.html (Russian algorithm description)
composer require insolita/metaphone
<?php
$word = '????';
$phonetic = (new Metaphone())->processWord($word); //????
Default set of filters include filter for lastname endings, if you want exclude only these filter, you can use helper
$withLastnames = (new Metaphone())->processWord('????????????'); //??????#
$withoutLastnames = (new Metaphone())->skipLastnames()->processWord('????????????'); //????????????
Provide custom filters. Each filter must implement insolita\metaphone\Filter
$metaphone = new Metaphone([Normalize::class, new CustomFilter($params), new HandleConsonants(true), ...])
$phonetic = $metaphone->processWord($word);
See tests folder for better understanding filters
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
src (2 files, 1 directory) | ||||
tests (6 files) | ||||
composer.json | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Read me |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
filters (5 files) | ||||
Filter.php | Class | Class source | ||
Metaphone.php | Class | Class source |
Files | / | src | / | filters |
File | Role | Description |
---|---|---|
HandleConsonants.php | Class | Class source |
HandleLastnameEndings.php | Class | Class source |
Normalize.php | Class | Class source |
RemoveDoubleChars.php | Class | Class source |
Replacements.php | Class | Class source |
Files | / | tests |
File | Role | Description |
---|---|---|
HandleConsonantsTest.php | Class | Class source |
HandleLastnameEndingsTest.php | Class | Class source |
MetaphoneTest.php | Class | Class source |
NormalizeTest.php | Class | Class source |
RemoveDoubleCharsTest.php | Class | Class source |
ReplacementsTest.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.