clang:stemmer( $variant as xs:string, [$normalization as xs:string?], [$args as item()*], [$library as xs:string] ) as element(lang:stemmer)
This function constructs a custom stemmer configuration item, suitable for use with clang:user-language-plugin.
clang:stemmer
and when passing a stemmer to
clang:user-language-plugin
then the library in the stemmer configuration takes precedence over the
library in the plugin configuration.
For a built-in stemmer, specify an empty string for the library name,
or omit the library
parameter and specify an empty string in
clang:user-language-plugin
.
For a user-defined plugin, the library name should be of the form
plugin_path/plugin_id
, such as "native/sample_plugin".
If you omit this parameter, then the library
value from
clang:user-language-plugin
will be used.
(: Create a stemmer config item for a user-defined plugin, and pass : in a configuration option (keep-short-vowels). :) xquery version "1.0-ml"; import module namespace clang = "http://marklogic.com/xdmp/custom-language" at "/MarkLogic/custom-language.xqy"; clang:stemmer("special_stemmer", "NFC", ("keep-short-vowels=true"), "native/sampleplugin")
(: Create a stemmer config item from a built-in plugin (bitext), : and pass in some configuration options. :) xquery version "1.0-ml"; import module namespace clang = "http://marklogic.com/xdmp/custom-language" at "/MarkLogic/custom-language.xqy"; clang:stemmer("bitext", (), ("algorithm=german2", "lowercase"), "")