Learn R Programming

phonics (version 1.1.0)

caverphone: Caverphone

Description

The Caverphone family of phonetic algorithms

Usage

caverphone(word, maxCodeLen = NULL, modified = FALSE)

Arguments

word

string or vector of strings to encode

maxCodeLen

maximum length of the resulting encodings, in characters

modified

if TRUE, use the Caverphone 2 algorithm

Value

the Caverphone encoded character vector

Caveats

The caverphone algorithm is only defined for inputs over the standard English alphabet, i.e., "A-Z." For inputs outside this range, the output is undefined.

Details

The variable maxCodeLen is the limit on how long the returned Caverphone code should be. The default is 6, unless modified is set to TRUE, then the default is 10.

The variable modified directs caverphone to use the Caverphone2 method, instead of the original.

References

David Hood, "Caverphone: Phonetic matching algorithm," Technical Paper CTP060902, University of Otago, New Zealand, 2002.

David Hood, "Caverphone Revisited," Technical Paper CTP150804 University of Otago, New Zealand, 2004.

See Also

Other phonics: cologne, lein, metaphone, mra_encode, nysiis, onca, phonex, rogerroot, soundex, statcan

Examples

Run this code
# NOT RUN {
caverphone("William")
caverphone(c("Peter", "Peady"), modified = TRUE)
caverphone("Stevenson", maxCodeLen = 4)

# }

Run the code above in your browser using DataLab