MarkLogic 9 Product Documentation
cts:stem

cts:stem(
   $text as xs:string,
   [$language as xs:string?],
   [$partOfSpeech as xs:string?]
) as xs:string*

Summary

Returns the stem(s) for a word.

Parameters
text A word or phrase to stem.
language A language to use for stemming. If not supplied, it uses the database default language.
partOfSpeech A part of speech to use for stemming. The default is the unspecified part of speech. This parameter is for testing custom stemmers.

Usage Notes

In general, you should pass a word into cts:stem; if you enter a phrase, it will stem the phrase, which will normally stem to itself.

When you stem a word through cts:stem, it returns all of the stems for the word, including decompounding and multiple stems, regardless of the database stemming setting.

Example

cts:stem("ran","en")
=> "run"
Powered by MarkLogic Server | Terms of Use | Privacy Policy