Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArSoundex

Source Location: /sub/ArSoundex.class.php

Class Overview


This PHP class implement Arabic soundex algorithm


Author(s):

Copyright:

  • 2006-2010 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 112]
This PHP class implement Arabic soundex algorithm



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2006-2010 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Variables

$aphonixCode = array()

[line 115]



Tags:

access:  protected

Type:   mixed


[ Top ]

$asoundexCode = array()

[line 114]



Tags:

access:  protected

Type:   mixed


[ Top ]

$code =  'soundex'

[line 121]



Tags:

access:  protected

Type:   mixed


[ Top ]

$lang =  'en'

[line 120]



Tags:

access:  protected

Type:   mixed


[ Top ]

$len =  4

[line 119]



Tags:

access:  protected

Type:   mixed


[ Top ]

$map = array()

[line 117]



Tags:

access:  protected

Type:   mixed


[ Top ]

$soundexInput =  'windows-1256'

[line 133]

"soundex" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$soundexOutput =  'windows-1256'

[line 127]

"soundex" method output charset



Tags:

access:  public

Type:   String


[ Top ]

$soundexVars = array('word')

[line 139]

Name of the textual "soundex" method parameters



Tags:

access:  public

Type:   Array


[ Top ]

$transliteration = array()

[line 116]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 144]

ArSoundex __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method getCode [line 257]

string getCode( )

Get the soundex key calculation method used now



Tags:

return:  return current setting for soundex key calculation method
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getLang [line 246]

string getLang( )

Get the soundex key language used now



Tags:

return:  return current setting for soundex key language
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getLen [line 235]

integer getLen( )

Get the soundex key length used now



Tags:

return:  return current setting for soundex key length
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method mapCode [line 270]

string mapCode( string $word)

Methode to get soundex/phonix numric code for given word



Tags:

return:  The calculated soundex/phonix numeric code
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $word   The word that we want to encode it

[ Top ]

method setCode [line 213]

object setCode( string $str)

Set the mapping code of the soundex key (default value is "soundex")



Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Soundex key mapping code [soundex|phonix]

[ Top ]

method setLang [line 194]

object setLang( string $str)

Set the language of the soundex key (default value is "en")



Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Soundex key language [ar|en]

[ Top ]

method setLen [line 179]

object setLen( integer $integer)

Set the length of soundex key (default value is 4)



Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $integer   Soundex key length

[ Top ]

method soundex [line 318]

string soundex( string $word)

Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words that are (roughly) phonetically alike.



Tags:

return:  Soundex value for a given Arabic word
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $word   Arabic word you want to calculate its soundex

[ Top ]

method trimRep [line 290]

string trimRep( string $word)

Remove any characters replicates



Tags:

return:  Same word without any duplicate chracters
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $word   Arabic word you want to check if it is feminine

[ Top ]


Documentation generated on Sat, 14 Aug 2010 13:23:57 -0700 by phpDocumentor 1.4.0