Functions
spanish_metaphone.php File Reference

Functions

 spanish_metaphone ($string)
 This is a Spanish version of the standard double metaphone tokenizer.
 spanish_metaphone_string_at ($string, $start, $string_length, $list)
 Search a string for the presence of substrings.
 spanish_metaphone_is_vowel ($string, $pos)
 See if the character at a given string position is a vowel.

Function Documentation

spanish_metaphone ( string)

This is a Spanish version of the standard double metaphone tokenizer.

Metaphone allows matching of strings phonetically, but is very language- dependent. The standard metaphone algorithm is for English, and misses a few rules for Spanish. This is a version that takes Spanish pronunciation into account when generating tokens.

Returns:
a metaphone token for the given Spanish string.
Parameters:
stringThe string to tokenize.

Referenced by SplitIntoMetaphone().

spanish_metaphone_is_vowel ( string,
pos 
)

See if the character at a given string position is a vowel.

Returns:
true if the character is a vowel.
Parameters:
stringThe string to search.
posThe position of the character to test.

Referenced by spanish_metaphone().

spanish_metaphone_string_at ( string,
start,
string_length,
list 
)

Search a string for the presence of substrings.

Returns:
true if the string contains any of the given substrings.
Parameters:
stringThe main string to search.
startThe position within the main string to start the search.
string_lengthThe length of the substrings to test.
listAn array of substrings.

Referenced by spanish_metaphone().

 All Classes Files Functions Variables Enumerations