File: classXapian_1_1Stem.html

package info (click to toggle)
xapian-core 1.2.12-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,180 kB
  • sloc: cpp: 100,708; sh: 11,201; ansic: 8,177; makefile: 813; perl: 758; python: 40
file content (262 lines) | stat: -rw-r--r-- 15,374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;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 &amp;o)" -->
&nbsp;</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> &amp;o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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 &amp;o)" -->
void&nbsp;</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> &amp;o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#0119ddb5f571853900db97689bf9122d">Stem</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#6c46cedf2047b159a7e4c9d4468242b1">Stem</a> (const std::string &amp;language)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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">&nbsp;</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">&nbsp;</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="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#c4e246e78c5c947537e11c3f7e718eca">~Stem</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Stem.html#7b2b85d741051a6f291834cca1eac20a">operator()</a> (const std::string &amp;word) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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 &amp; 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>&nbsp;)&nbsp;</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 &amp;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 &amp;&nbsp;</td>
          <td class="paramname"> <em>language</em>          </td>
          <td>&nbsp;)&nbsp;</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>&nbsp;</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 &szlig;</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>&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</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>&nbsp;</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>&nbsp;)&nbsp;</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 &amp;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 &amp;&nbsp;</td>
          <td class="paramname"> <em>word</em>          </td>
          <td>&nbsp;)&nbsp;</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>&nbsp;</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>