Loading TOC...

MarkLogic Server 11.0 Product Documentation
spell.doubleMetaphone

spell.doubleMetaphone(
   word as String
) as Sequence

Summary

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.

Parameters
word The word for phonetic matching.

Usage Notes

The spell:double-metaphone function is a built-in function and does not require the import module statement in the XQuery prolog.

Example

spell.doubleMetaphone('smith');
  
=> smo xmt

Example

spell.doubleMetaphone('jones');
  
=> jns ans

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.