PhoneticEncoders generate one or more keys for a given word
using a phonetic algorithm. The goal of each phonetic algorithm is to
generate the same keys for words which have a similar pronunciation.
public abstract java.lang.String[] generateKeys(java.lang.String word)
Generates an array of keys.
Parameters:
word - the word for which the keys have to be generated.
Returns:
an array of keys. The keys of more importance are found
at the smaller indices, i.e. the most important key is found
at index zero. The array is never null, but of length
zero, if the given word is null or the empty-string.
generateKey
public abstract java.lang.String generateKey(java.lang.String word)
Generates a key. If the underlying algorithm creates more
than one key, the default key, i.e. the most important key, is returned.
Parameters:
word - the word for which the key has to be generated.
Returns:
a key. The result is never null, i.e. if
the given word is null or the empty-string,
then the empty-string is returned.