
cdict:dictionary-read( $lang as xs:string, [$tokenization as xs: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.
xquery version "1.0-ml";
import module namespace cdict = "http://marklogic.com/xdmp/custom-dictionary"
at "/MarkLogic/custom-dictionary.xqy";
cdict:dictionary-read("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.