Loading TOC...

spell.suggest

spell.suggest(
   $uri as String[],
   $word as String,
   [$options as Object?]
) as ValueIterator

Summary

Suggests a list of spellings for a word. Returns a ValueIterator containing the most likely spellings for the specified word.

Parameters
$uri The URIs of the dictionaries to use.
$word The word for which you get spelling suggestions.
$options The options object for this suggest operation. The default is null.

The spell.suggest options include:

maximum
Specifies the maximum number of suggestions to be returned. The default is 10.
distanceThreshold
Specifies a cut off threshold for suggestions having a distance less than the given number. The default is 100.

Usage Notes

The spell.suggest function only provides suggestions to words that are less than 64 characters in length; words 64 characters or longer return no suggestions. Also, it removes any dictionary entries that are 64 characters or more, so it will never return a suggestion with greater than 64 characters.

Example

spell.suggest("myDictionary.xml","occasionally")

=> A ValueIterator with the values for each suggestion:
   occasionally occasional occasion occasions occasion's
   occasioned optionally educationally irrationally

Example

spell.suggest("spell.xml", "albetros")

=> A ValueIterator with the values for each suggestion:
   albatross abettors alders alters Albert's Elbert's
   allegros alder's Walters abettor's

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy