The spelling correction built-in functions are used with dictionary documents to compare words with words in the dictionary. These functions use the double metaphone algorithm, which uses the way words sound to try and suggest spelling alternatives for incorrectly-spelled words.
There is also a Spelling Dictionary Management XQuery module, which is used to load and manage dictionary documents, and is complimentary to the spelling built-in functions.
Function name | Description |
---|---|
spell.doubleMetaphone | Given a word returns the two metaphone keys. |
spell.isCorrect | Returns true() if the specified word is spelled correctly, otherwise returns false(). |
spell.levenshteinDistance | Given two strings, returns the Levenshtein distance between those strings. |
spell.romanize | Returns the romanization of the string, substituting basic Latin letters for the letters in the string, according to their sound. |
spell.suggest | Suggests a list of spellings for a word. |
spell.suggestDetailed | Suggests a list of spellings for a word. |