I18N_Arabic

# Procedural File: Soundex.php Source Location: /Arabic/Soundex.php ## Classes: I18N_Arabic_Soundex This PHP class implement Arabic soundex algorithm ## Page Details: ---------------------------------------------------------------------- Copyright (c) 2006-2013 Khaled Al-Sham'aa. http://www.ar-php.org PHP Version 5 ---------------------------------------------------------------------- LICENSE This program is open source product; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/lgpl.txt>. ---------------------------------------------------------------------- Class Name: Arabic Soundex Filename: Soundex.php Original Author(s): Khaled Al-Sham'aa <khaled@ar-php.org> Purpose: Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words that are (roughly) phonetically alike. ---------------------------------------------------------------------- Arabic Soundex PHP class for Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words of those are (roughly) phonetically alike. Terms that are often misspelled can be a problem for database designers. Names, for example, are variable length, can have strange spellings, and they are not unique. Words can be misspelled or have multiple spellings, especially across different cultures or national sources. To solve this problem, we need phonetic algorithms which can find similar sounding terms and names. Just such a family of algorithms exists and is called SoundExes, after the first patented version. A Soundex search algorithm takes a word, such as a person's name, as input and produces a character string which identifies a set of words that are (roughly) phonetically alike. It is very handy for searching large databases when the user has incomplete data. The original Soundex algorithm was patented by Margaret O'Dell and Robert C. Russell in 1918. The method is based on the six phonetic classifications of human speech sounds (bilabial, labiodental, dental, alveolar, velar, and glottal), which in turn are based on where you put your lips and tongue to make the sounds. Soundex function that is available in PHP, but it has been limited to English and other Latin-based languages. This function described in PHP manual as the following: Soundex keys have the property that words pronounced similarly produce the same soundex key, and can thus be used to simplify searches in databases where you know the pronunciation but not the spelling. This soundex function returns string of 4 characters long, starting with a letter. We develop this class as an Arabic counterpart to English Soundex, it handle an Arabic input string formatted in UTF-8 character set to return Soundex key equivalent to normal soundex function in PHP even for English and other Latin-based languages because the original algorithm focus on phonetically characters alike not the meaning of the word itself. Example: include('./I18N/Arabic.php'); $obj = new I18N_Arabic('Soundex'); $soundex = $obj->soundex($name); #### Tags:
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
copyright: | 2006-2013 Khaled Al-Sham'aa
link: | http://www.ar-php.org
filesource: | Source Code for this file
license: | LGPL
Documentation generated on Mon, 14 Jan 2013 17:49:05 +0100 by phpDocumentor 1.4.0