承接 startcodein/indicsoundex 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

startcodein/indicsoundex

最新稳定版本:0.1.0

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.

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-10-16