startcodein/indicsoundex
Composer 安装命令:
composer require startcodein/indicsoundex
包简介
Indian language soundex package based on Santhosh Thottingal's algorithm.
关键字:
README 文档
README
Indian laguage soundex package based on Santhosh Thottingal's algorithm. For more info on algorithm check here
Soundex is phonetic algorithm for indexing names by sound as pronounced in English. This module implements Soundex algorithm for Engish as well as a modified version of soundex algorithm for Indian languages.
This include Indian major languages:
- Hindi (hi_IN)
- Bengali (bn_IN)
- Punjabi (pa_IN)
- Gujarati (gu_IN)
- Oriya (or_IN)
- Tamil (ta_IN)
- Telugu (te_IN)
- Kannada (kn_IN)
- Malayalam (ml_IN)
- English (en_US)
This can be extended to any language by including soundex character map for it.
Quick start
Installing using git
git clone https://github.com/startcodein/IndicSoundex.git
Installing using composer
composer require startcodein/indicsoundex:@dev
Generating soundex
<?php
use Startcode\IndicSoundex\IndicSoundex as IndicSoundex;
$sound = new IndicSoundex();
echo $sound->soundex('ಬೆಂಗಳೂರು').PHP_EOL;
echo $sound->soundex('आम्र् फल्').PHP_EOL;
echo $sound->soundex('vasudev').PHP_EOL;
echo $sound->soundex('Rupert्').PHP_EOL;
This will give output
ಬDNFQCPC
आNPMQ000
v2310000
r1630000
Comparing string soundex
<?php
use Startcode\IndicSoundex\IndicSoundex as IndicSoundex;
$sound = new IndicSoundex();
echo $sound->compare('बॆंगळूरु','आम्र् फल्').PHP_EOL;
echo $sound->compare('Bangalore','ಬೆಂಗಳೂರು').PHP_EOL;
echo $sound->compare('बॆंगळूरु','बॆंगळूरु').PHP_EOL;
echo $sound->compare('അമ്മ','അമ').PHP_EOL;
This will give output like this
-1 //Not equal
-1 //Not equal
0 // Same word
1 // Similar
2 //Diff lang similar
License
Copyright(c) 2015 Sanoob Pattanath
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
Contributions
Any kind of contributions are really appreciated. If you find any bugs or security issues please email hello[at]pattanath.com or raise an issue on github.
startcodein/indicsoundex 适用场景与选型建议
startcodein/indicsoundex 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 10 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「language」 「unicode」 「soundex」 「india」 「indicsoundex」 「startcodein」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 startcodein/indicsoundex 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 startcodein/indicsoundex 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 startcodein/indicsoundex 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Easy to use i18n translation PHP class for multi-language websites
Package for convenient work with Laravel's localization features
A Laravel 5 Package for Using & Working With Emojis
Store your language lines in the database, yaml or other sources
Compute a french soundex of a string.
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2015-10-16