Namespace: spell

planBuilder. spell

Builds expressions to call functions in the spell server library for a row pipeline.
Since:
  • 2.1.1

Methods


doubleMetaphone(word) → {XsString}

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.doubleMetaphone
Parameters:
Name Type Argument Description
word XsString <optional>
The word for phonetic matching.
Since:
  • 2.1.1
Returns:
Type
XsString

levenshteinDistance(str1, str2) → {XsInteger}

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.levenshteinDistance
Parameters:
Name Type Argument Description
str1 XsString <optional>
The first input string.
str2 XsString <optional>
The second input string.
Since:
  • 2.1.1
Returns:
Type
XsInteger

romanize(string) → {XsString}

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
Parameters:
Name Type Argument Description
string XsString <optional>
The input string.
Since:
  • 2.1.1
Returns:
Type
XsString
Copyright 2014-2018 MarkLogic Corporation Documentation generated by JSDoc 3.5.5 on 2018-05-04T02:41:55-07:00 using the DocStrap template.