PageRenderTime 21ms CodeModel.GetById 11ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/tagger.Tagger-class.html

http://github.com/apresta/tagger
HTML | 251 lines | 211 code | 19 blank | 21 comment | 0 complexity | b4362ad0423b88441572d8078b6a165f MD5 | raw file
  1<?xml version="1.0" encoding="ascii"?>
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3          "DTD/xhtml1-transitional.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5<head>
  6  <title>tagger.Tagger</title>
  7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8  <script type="text/javascript" src="epydoc.js"></script>
  9</head>
 10
 11<body bgcolor="white" text="black" link="blue" vlink="#204080"
 12      alink="#204080">
 13<!-- ==================== NAVIGATION BAR ==================== -->
 14<table class="navbar" border="0" width="100%" cellpadding="0"
 15       bgcolor="#a0c0ff" cellspacing="0">
 16  <tr valign="middle">
 17
 18  <!-- Tree link -->
 19      <th>&nbsp;&nbsp;&nbsp;<a
 20        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 21
 22  <!-- Index link -->
 23      <th>&nbsp;&nbsp;&nbsp;<a
 24        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 25
 26  <!-- Help link -->
 27      <th>&nbsp;&nbsp;&nbsp;<a
 28        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 29
 30  <!-- Project homepage -->
 31      <th class="navbar" align="right" width="100%">
 32        <table border="0" cellpadding="0" cellspacing="0">
 33          <tr><th class="navbar" align="center"
 34            ><a class="navbar" target="_top" href="http://github.com/apresta/tagger">tagger</a></th>
 35          </tr></table></th>
 36  </tr>
 37</table>
 38<table width="100%" cellpadding="0" cellspacing="0">
 39  <tr valign="top">
 40    <td width="100%">
 41      <span class="breadcrumbs">
 42        <a href="tagger-module.html">Module&nbsp;tagger</a> ::
 43        Class&nbsp;Tagger
 44      </span>
 45    </td>
 46    <td>
 47      <table cellpadding="0" cellspacing="0">
 48        <!-- hide/show private -->
 49        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 50    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 51        <tr><td align="right"><span class="options"
 52            >[<a href="frames.html" target="_top">frames</a
 53            >]&nbsp;|&nbsp;<a href="tagger.Tagger-class.html"
 54            target="_top">no&nbsp;frames</a>]</span></td></tr>
 55      </table>
 56    </td>
 57  </tr>
 58</table>
 59<!-- ==================== CLASS DESCRIPTION ==================== -->
 60<h1 class="epydoc">Class Tagger</h1><p class="nomargin-top"><span class="codelink"><a href="tagger-pysrc.html#Tagger">source&nbsp;code</a></span></p>
 61<p>Master class for tagging text documents</p>
 62  <p>(this is a simple interface that should allow convenient 
 63  experimentation by using different classes as building blocks)</p>
 64
 65<!-- ==================== INSTANCE METHODS ==================== -->
 66<a name="section-InstanceMethods"></a>
 67<table class="summary" border="1" cellpadding="3"
 68       cellspacing="0" width="100%" bgcolor="white">
 69<tr bgcolor="#70b0f0" class="table-header">
 70  <td colspan="2" class="table-header">
 71    <table border="0" cellpadding="0" cellspacing="0" width="100%">
 72      <tr valign="top">
 73        <td align="left"><span class="table-header">Instance Methods</span></td>
 74        <td align="right" valign="top"
 75         ><span class="options">[<a href="#section-InstanceMethods"
 76         class="privatelink" onclick="toggle_private();"
 77         >hide private</a>]</span></td>
 78      </tr>
 79    </table>
 80  </td>
 81</tr>
 82<tr>
 83    <td width="15%" align="right" valign="top" class="summary">
 84      <span class="summary-type">&nbsp;</span>
 85    </td><td class="summary">
 86      <table width="100%" cellpadding="0" cellspacing="0" border="0">
 87        <tr>
 88          <td><span class="summary-sig"><a href="tagger.Tagger-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
 89        <span class="summary-sig-arg">reader</span>,
 90        <span class="summary-sig-arg">stemmer</span>,
 91        <span class="summary-sig-arg">rater</span>)</span><br />
 92      Returns:
 93      a new <a href="tagger.Tagger-class.html" class="link">Tagger</a> 
 94      object</td>
 95          <td align="right" valign="top">
 96            <span class="codelink"><a href="tagger-pysrc.html#Tagger.__init__">source&nbsp;code</a></span>
 97            
 98          </td>
 99        </tr>
100      </table>
101      
102    </td>
103  </tr>
104<tr>
105    <td width="15%" align="right" valign="top" class="summary">
106      <span class="summary-type">&nbsp;</span>
107    </td><td class="summary">
108      <table width="100%" cellpadding="0" cellspacing="0" border="0">
109        <tr>
110          <td><span class="summary-sig"><a href="tagger.Tagger-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
111        <span class="summary-sig-arg">text</span>,
112        <span class="summary-sig-arg">tags_number</span>=<span class="summary-sig-default">5</span>)</span></td>
113          <td align="right" valign="top">
114            <span class="codelink"><a href="tagger-pysrc.html#Tagger.__call__">source&nbsp;code</a></span>
115            
116          </td>
117        </tr>
118      </table>
119      
120    </td>
121  </tr>
122</table>
123<!-- ==================== METHOD DETAILS ==================== -->
124<a name="section-MethodDetails"></a>
125<table class="details" border="1" cellpadding="3"
126       cellspacing="0" width="100%" bgcolor="white">
127<tr bgcolor="#70b0f0" class="table-header">
128  <td colspan="2" class="table-header">
129    <table border="0" cellpadding="0" cellspacing="0" width="100%">
130      <tr valign="top">
131        <td align="left"><span class="table-header">Method Details</span></td>
132        <td align="right" valign="top"
133         ><span class="options">[<a href="#section-MethodDetails"
134         class="privatelink" onclick="toggle_private();"
135         >hide private</a>]</span></td>
136      </tr>
137    </table>
138  </td>
139</tr>
140</table>
141<a name="__init__"></a>
142<div>
143<table class="details" border="1" cellpadding="3"
144       cellspacing="0" width="100%" bgcolor="white">
145<tr><td>
146  <table width="100%" cellpadding="0" cellspacing="0" border="0">
147  <tr valign="top"><td>
148  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
149        <span class="sig-arg">reader</span>,
150        <span class="sig-arg">stemmer</span>,
151        <span class="sig-arg">rater</span>)</span>
152    <br /><em class="fname">(Constructor)</em>
153  </h3>
154  </td><td align="right" valign="top"
155    ><span class="codelink"><a href="tagger-pysrc.html#Tagger.__init__">source&nbsp;code</a></span>&nbsp;
156    </td>
157  </tr></table>
158  
159  
160  <dl class="fields">
161    <dt>Parameters:</dt>
162    <dd><ul class="nomargin-top">
163        <li><strong class="pname"><code>reader</code></strong> - a <a href="tagger.Reader-class.html" class="link">Reader</a> 
164          object</li>
165        <li><strong class="pname"><code>stemmer</code></strong> - a <a href="tagger.Stemmer-class.html" class="link">Stemmer</a> 
166          object</li>
167        <li><strong class="pname"><code>rater</code></strong> - a <a href="tagger.Rater-class.html" class="link">Rater</a> object</li>
168    </ul></dd>
169    <dt>Returns:</dt>
170        <dd>a new <a href="tagger.Tagger-class.html" class="link">Tagger</a> 
171          object</dd>
172  </dl>
173</td></tr></table>
174</div>
175<a name="__call__"></a>
176<div>
177<table class="details" border="1" cellpadding="3"
178       cellspacing="0" width="100%" bgcolor="white">
179<tr><td>
180  <table width="100%" cellpadding="0" cellspacing="0" border="0">
181  <tr valign="top"><td>
182  <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
183        <span class="sig-arg">text</span>,
184        <span class="sig-arg">tags_number</span>=<span class="sig-default">5</span>)</span>
185    <br /><em class="fname">(Call operator)</em>
186  </h3>
187  </td><td align="right" valign="top"
188    ><span class="codelink"><a href="tagger-pysrc.html#Tagger.__call__">source&nbsp;code</a></span>&nbsp;
189    </td>
190  </tr></table>
191  
192  
193  <dl class="fields">
194    <dt>Parameters:</dt>
195    <dd><ul class="nomargin-top">
196        <li><strong class="pname"><code>text</code></strong> - the string of text to be tagged</li>
197        <li><strong class="pname"><code>tags_number</code></strong> - number of best tags to be returned
198          <p>Returns: a list of (hopefully) relevant tags</p></li>
199    </ul></dd>
200  </dl>
201</td></tr></table>
202</div>
203<br />
204<!-- ==================== NAVIGATION BAR ==================== -->
205<table class="navbar" border="0" width="100%" cellpadding="0"
206       bgcolor="#a0c0ff" cellspacing="0">
207  <tr valign="middle">
208
209  <!-- Tree link -->
210      <th>&nbsp;&nbsp;&nbsp;<a
211        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
212
213  <!-- Index link -->
214      <th>&nbsp;&nbsp;&nbsp;<a
215        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
216
217  <!-- Help link -->
218      <th>&nbsp;&nbsp;&nbsp;<a
219        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
220
221  <!-- Project homepage -->
222      <th class="navbar" align="right" width="100%">
223        <table border="0" cellpadding="0" cellspacing="0">
224          <tr><th class="navbar" align="center"
225            ><a class="navbar" target="_top" href="http://github.com/apresta/tagger">tagger</a></th>
226          </tr></table></th>
227  </tr>
228</table>
229<table border="0" cellpadding="0" cellspacing="0" width="100%%">
230  <tr>
231    <td align="left" class="footer">
232    Generated by Epydoc 3.0.1 on Fri May 13 11:13:08 2011
233    </td>
234    <td align="right" class="footer">
235      <a target="mainFrame" href="http://epydoc.sourceforge.net"
236        >http://epydoc.sourceforge.net</a>
237    </td>
238  </tr>
239</table>
240
241<script type="text/javascript">
242  <!--
243  // Private objects are initially displayed (because if
244  // javascript is turned off then we want them to be
245  // visible); but by default, we want to hide them.  So hide
246  // them unless we have a cookie that says to show them.
247  checkCookie();
248  // -->
249</script>
250</body>
251</html>