<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Xapian: API Documentation: xapian-core: Xapian::Stem Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.5.9 --> <script type="text/javascript"> <!-- function changeDisplayState (e){ var num=this.id.replace(/[^[0-9]/g,''); var button=this.firstChild; var sectionDiv=document.getElementById('dynsection'+num); if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ sectionDiv.style.display='block'; button.src='open.gif'; }else{ sectionDiv.style.display='none'; button.src='closed.gif'; } } function initDynSections(){ var divs=document.getElementsByTagName('div'); var sectionCounter=1; for(var i=0;i<divs.length-1;i++){ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ var header=divs[i]; var section=divs[i+1]; var button=header.firstChild; if (button!='IMG'){ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); button=document.createElement('img'); divs[i].insertBefore(button,divs[i].firstChild); } header.style.cursor='pointer'; header.onclick=changeDisplayState; header.id='dynheader'+sectionCounter; button.src='closed.gif'; section.id='dynsection'+sectionCounter; section.style.display='none'; section.style.marginLeft='14px'; sectionCounter++; } } } window.onload = initDynSections; --> </script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1Stem.html">Stem</a> </div> </div> <div class="contents"> <h1>Xapian::Stem Class Reference</h1><!-- doxytag: class="Xapian::Stem" -->Class representing a stemming algorithm. <a href="#_details">More...</a> <p> <p> <a href="classXapian_1_1Stem-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="960dac1047a3cfe21ff3d013df1d41dd"></a><!-- doxytag: member="Xapian::Stem::Stem" ref="960dac1047a3cfe21ff3d013df1d41dd" args="(const Stem &o)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#960dac1047a3cfe21ff3d013df1d41dd">Stem</a> (const <a class="el" href="classXapian_1_1Stem.html">Stem</a> &o)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9830ec0646839663ed6afd2c9889790"></a><!-- doxytag: member="Xapian::Stem::operator=" ref="b9830ec0646839663ed6afd2c9889790" args="(const Stem &o)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#b9830ec0646839663ed6afd2c9889790">operator=</a> (const <a class="el" href="classXapian_1_1Stem.html">Stem</a> &o)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#0119ddb5f571853900db97689bf9122d">Stem</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object which doesn't change terms. <a href="#0119ddb5f571853900db97689bf9122d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#6c46cedf2047b159a7e4c9d4468242b1">Stem</a> (const std::string &language)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object for a particular language. <a href="#6c46cedf2047b159a7e4c9d4468242b1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#bae2c707ea039fc519103ed75c7429fb">Stem</a> (<a class="el" href="structXapian_1_1StemImplementation.html">StemImplementation</a> *p)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object with a user-provided stemming algorithm. <a href="#bae2c707ea039fc519103ed75c7429fb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c4e246e78c5c947537e11c3f7e718eca"></a><!-- doxytag: member="Xapian::Stem::~Stem" ref="c4e246e78c5c947537e11c3f7e718eca" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#c4e246e78c5c947537e11c3f7e718eca">~Stem</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#7b2b85d741051a6f291834cca1eac20a">operator()</a> (const std::string &word) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Stem</a> a word. <a href="#7b2b85d741051a6f291834cca1eac20a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4fc423b2a8119c4b810654f1ae8da0a"></a><!-- doxytag: member="Xapian::Stem::get_description" ref="a4fc423b2a8119c4b810654f1ae8da0a" args="() const " --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#a4fc423b2a8119c4b810654f1ae8da0a">get_description</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a string describing this object. <br></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#0f8f250587dfef35d47f13f0ec0028fb">get_available_languages</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a list of available languages. <a href="#0f8f250587dfef35d47f13f0ec0028fb"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Class representing a stemming algorithm. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="0119ddb5f571853900db97689bf9122d"></a><!-- doxytag: member="Xapian::Stem::Stem" ref="0119ddb5f571853900db97689bf9122d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Xapian::Stem::Stem </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object which doesn't change terms. <p> Equivalent to <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Stem</a>("none"). </div> </div><p> <a class="anchor" name="6c46cedf2047b159a7e4c9d4468242b1"></a><!-- doxytag: member="Xapian::Stem::Stem" ref="6c46cedf2047b159a7e4c9d4468242b1" args="(const std::string &language)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Xapian::Stem::Stem </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>language</em> </td> <td> ) </td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object for a particular language. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>language</em> </td><td>Either the English name for the language or the two letter ISO639 code.</td></tr> </table> </dl> The following language names are understood (aliases follow the name):<p> <ul> <li>none - don't stem terms</li><li>danish (da)</li><li>dutch (nl)</li><li>english (en) - Martin Porter's 2002 revision of his stemmer</li><li>english_lovins (lovins) - Lovin's stemmer</li><li>english_porter (porter) - Porter's stemmer as described in his 1980 paper</li><li>finnish (fi)</li><li>french (fr)</li><li>german (de)</li><li>german2 - Normalises umlauts and ß</li><li>hungarian (hu)</li><li>italian (it)</li><li>kraaij_pohlmann - A different Dutch stemmer</li><li>norwegian (nb, nn, no)</li><li>portuguese (pt)</li><li>romanian (ro)</li><li>russian (ru)</li><li>spanish (es)</li><li>swedish (sv)</li><li>turkish (tr)</li></ul> <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API.">Xapian::InvalidArgumentError</a></em> </td><td>is thrown if language isn't recognised. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="bae2c707ea039fc519103ed75c7429fb"></a><!-- doxytag: member="Xapian::Stem::Stem" ref="bae2c707ea039fc519103ed75c7429fb" args="(StemImplementation *p)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Xapian::Stem::Stem </td> <td>(</td> <td class="paramtype"><a class="el" href="structXapian_1_1StemImplementation.html">StemImplementation</a> * </td> <td class="paramname"> <em>p</em> </td> <td> ) </td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Construct a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object with a user-provided stemming algorithm. <p> You can subclass <a class="el" href="structXapian_1_1StemImplementation.html" title="Class representing a stemming algorithm implementation.">Xapian::StemImplementation</a> to implement your own stemming algorithm (or to wrap a third-party algorithm) and then wrap your implementation in a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object to pass to the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>The user-subclassed <a class="el" href="structXapian_1_1StemImplementation.html" title="Class representing a stemming algorithm implementation.">StemImplementation</a> object. This is reference counted, and so will be automatically deleted by the <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> wrapper when no longer required. </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="0f8f250587dfef35d47f13f0ec0028fb"></a><!-- doxytag: member="Xapian::Stem::get_available_languages" ref="0f8f250587dfef35d47f13f0ec0028fb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static std::string Xapian::Stem::get_available_languages </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return a list of available languages. <p> Each stemmer is only included once in the list (not once for each alias). The name included is the English name of the language.<p> The list is returned as a string, with language names separated by spaces. This is a static method, so a <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Xapian::Stem</a> object is not required for this operation. </div> </div><p> <a class="anchor" name="7b2b85d741051a6f291834cca1eac20a"></a><!-- doxytag: member="Xapian::Stem::operator()" ref="7b2b85d741051a6f291834cca1eac20a" args="(const std::string &word) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Xapian::Stem::operator() </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>word</em> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> <a class="el" href="classXapian_1_1Stem.html" title="Class representing a stemming algorithm.">Stem</a> a word. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>word</em> </td><td>a word to stem. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the stem </dd></dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>xapian/<a class="el" href="stem_8h.html">stem.h</a></ul> </div> <hr> <address><small> Documentation for Xapian (version 1.2.12).<br> Generated on 27 Jun 2012 by <a href="http://www.doxygen.org/">Doxygen 1.5.9</a>. </small></address> </body> </html>