cdict.dictionaryRead( lang as String, [tokenization as Boolean] ) as element(cdict.dictionary)?
Retrieve the custom dictionary for a language.
custom-dictionary-user
or the
following privileges:
http://marklogic.com/xdmp/privileges/custom-dictionary-user
The returned dictionary element will have an xml:lang
attribute indicating the language.
const cdict = require('/MarkLogic/custom-dictionary'); cdict.dictionaryRead('en'); /* Returns a dictionary similar to the following: <cdict:dictionary xmlns:cdict="http://marklogic.com/xdmp/custom-dictionary" xml:lang="en"> <cdict:entry> <cdict:word>Furbies</cdict:word> <cdict:stem>Furby</cdict:stem> </cdict:entry> <cdict:entry> <cdict:word>servlets</cdict:word> <cdict:stem>servlet</cdict:stem> </cdict:entry> </cdict:dictionary> */
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.