<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/cts.stem.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>cts.stem</api:function-name><api:suggest>cts.stem</api:suggest><api:suggest>cts</api:suggest><api:suggest>stem</api:suggest><api:function-link mode="xquery" fullname="cts:stem">/apidoc/8.0/cts:stem.xml</api:function-link><api:function mode="javascript" name="stem" type="builtin" lib="cts" category="SearchBuiltins" subcategory="Search" hidden="false" bucket="MarkLogic Built-In Functions" prefix="cts" namespace="http://marklogic.com/cts" fullname="cts.stem"><api:summary>
  Returns the stem(s) for a word.
</api:summary><api:params><api:param name="text" type="xs:string"><api:param-description>
    A word or phrase to stem.
  </api:param-description><api:param-name>text</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="language" type="xs:string?" optional="true"><api:param-description>
    A language to use for stemming.  If not supplied, it uses the
    database default language.
  </api:param-description><api:param-name>language</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:usage>
<p xmlns="http://www.w3.org/1999/xhtml">In general, you should pass a word into
<code class="javascript">cts.stem</code>;
if you enter a phrase, it will stem the phrase, which will normally stem to
itself.</p>
<p xmlns="http://www.w3.org/1999/xhtml">When you stem a word through
<code class="javascript">cts.stem</code>,
it returns all of the stems for the word, including decompounding and multiple
stems, regardless of the database stemming setting.</p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
cts.stem("ran","en")
=&gt; "run"
</pre></api:example></api:function></api:function-page>