public interface SpellExpr
Builds expressions to call functions in the spell server library for a row pipeline.
| Modifier and Type | Method and Description |
|---|---|
XsStringSeqExpr |
doubleMetaphone(XsStringExpr word)
Given a word returns the two metaphone keys.
|
XsIntegerExpr |
levenshteinDistance(XsStringExpr str1,
String str2)
Given two strings, returns the Levenshtein distance between those strings.
|
XsIntegerExpr |
levenshteinDistance(XsStringExpr str1,
XsStringExpr str2)
Given two strings, returns the Levenshtein distance between those strings.
|
XsStringExpr |
romanize(XsStringExpr string)
Returns the romanization of the string, substituting basic Latin letters for the letters in the string, according to their sound.
|
XsStringSeqExpr doubleMetaphone(XsStringExpr word)
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.
Provides a client interface to a server function. See spell:double-metaphone
word - The word for phonetic matching.XsIntegerExpr levenshteinDistance(XsStringExpr str1, String str2)
Given two strings, returns the Levenshtein distance between those strings. The Levenshtein distance is a measure of how many operations it takes to transform a string into another string, and it is useful in determining if a word is spelled correctly, or in simply comparing how “different” two words are.
Provides a client interface to a server function. See spell:levenshtein-distance
str1 - The first input string.str2 - The second input string.XsIntegerExpr levenshteinDistance(XsStringExpr str1, XsStringExpr str2)
Given two strings, returns the Levenshtein distance between those strings. The Levenshtein distance is a measure of how many operations it takes to transform a string into another string, and it is useful in determining if a word is spelled correctly, or in simply comparing how “different” two words are.
Provides a client interface to a server function. See spell:levenshtein-distance
str1 - The first input string.str2 - The second input string.XsStringExpr romanize(XsStringExpr string)
Returns the romanization of the string, substituting basic Latin letters for the letters in the string, according to their sound. Unsupported characters will be mapped to ‘?’ for compatibility with the double metaphone algorithm. We support romanization of the scripts of the languages with advanced support in MarkLogic except for Chinese characters and Hangul.
Provides a client interface to a server function. See spell:romanize
string - The input string.Copyright © 2013-2017 MarkLogic Corporation.