spell.doubleMetaphone( $word as String ) as ValueIterator
Given a word returns the two metaphone keys. The primary and secondary metaphone keys which represent the phonetic encoding of two words are returned as a sequence of two strings. Double metaphone is an algorithm based on phonetic sounds useful in providing data to spelling correction suggestions.
|$word||The word for phonetic matching.|
spell:double-metaphonefunction is a built-in function and does not require the
import modulestatement in the XQuery prolog.
spell.doubleMetaphone("smith"); => smo xmt
spell.doubleMetaphone("jones"); => jns ans