MarkLogic Server 11.0 Product Documentation
spell functions (Spelling Dictionary Management)

The spelling functions are designed to help you manage dictionary documents in MarkLogic Server. You can create dictionary documents in both JSON and XML formats. The spelling function module is installed as the following file:

where install_dir is the directory in which MarkLogic Server is installed.

To use the spell.xqy module in your own XQuery modules, include the following line in your XQuery prolog:

import module namespace spell = "http://marklogic.com/xdmp/spell" at "/MarkLogic/spell.xqy";

The library uses the spell: namespace, predefined in the server.

The spelling correction functions (spell:is-correct and spell:suggest) are built-in functions and do not require the import module statement in the XQuery prolog.

There are also Spell Built-In functions, which you use to check if words are spelled correctly according to the dictionaries and to suggest alternate spellings.

5 functions
Function name Description
spell:add-word Add the word $word to the dictionary at $uri.
spell:insert Load the words in $dict into the dictionary at $uri.
spell:load Add the words from the file specified in $path to the dictionary at $uri.
spell:make-dictionary Creates a dictionary node from a sequence of words.
spell:remove-word Remove the word $word from the dictionary at $uri.
Powered by MarkLogic Server | Terms of Use | Privacy Policy