PageRenderTime 30ms CodeModel.GetById 13ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/tagger.Tag-class.html

http://github.com/apresta/tagger
HTML | 282 lines | 238 code | 23 blank | 21 comment | 0 complexity | 2783dcdae64e180e0c3ab5f412be87a4 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.Tag</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;Tag
 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.Tag-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 Tag</h1><p class="nomargin-top"><span class="codelink"><a href="tagger-pysrc.html#Tag">source&nbsp;code</a></span></p>
 61<center>
 62<center>  <map id="class_hierarchy_for_tag" name="class_hierarchy_for_tag">
 63<area shape="rect" id="node1" href="tagger.MultiTag-class.html" title="MultiTag" alt="" coords="5,61,80,88"/>
 64<area shape="rect" id="node2" href="tagger.Tag-class.html" title="Tag" alt="" coords="20,5,65,32"/>
 65</map>
 66  <img src="class_hierarchy_for_tag.gif" alt='' usemap="#class_hierarchy_for_tag" ismap="ismap" class="graph-without-title" />
 67</center>
 68</center>
 69<hr />
 70<p>General class for tags (small units of text)</p>
 71
 72<!-- ==================== INSTANCE METHODS ==================== -->
 73<a name="section-InstanceMethods"></a>
 74<table class="summary" border="1" cellpadding="3"
 75       cellspacing="0" width="100%" bgcolor="white">
 76<tr bgcolor="#70b0f0" class="table-header">
 77  <td colspan="2" class="table-header">
 78    <table border="0" cellpadding="0" cellspacing="0" width="100%">
 79      <tr valign="top">
 80        <td align="left"><span class="table-header">Instance Methods</span></td>
 81        <td align="right" valign="top"
 82         ><span class="options">[<a href="#section-InstanceMethods"
 83         class="privatelink" onclick="toggle_private();"
 84         >hide private</a>]</span></td>
 85      </tr>
 86    </table>
 87  </td>
 88</tr>
 89<tr>
 90    <td width="15%" align="right" valign="top" class="summary">
 91      <span class="summary-type">&nbsp;</span>
 92    </td><td class="summary">
 93      <table width="100%" cellpadding="0" cellspacing="0" border="0">
 94        <tr>
 95          <td><span class="summary-sig"><a href="tagger.Tag-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
 96        <span class="summary-sig-arg">string</span>,
 97        <span class="summary-sig-arg">stem</span>=<span class="summary-sig-default">None</span>,
 98        <span class="summary-sig-arg">rating</span>=<span class="summary-sig-default">1.0</span>,
 99        <span class="summary-sig-arg">proper</span>=<span class="summary-sig-default">False</span>,
100        <span class="summary-sig-arg">terminal</span>=<span class="summary-sig-default">False</span>)</span><br />
101      Returns:
102      a new <a href="tagger.Tag-class.html" class="link">Tag</a> object</td>
103          <td align="right" valign="top">
104            <span class="codelink"><a href="tagger-pysrc.html#Tag.__init__">source&nbsp;code</a></span>
105            
106          </td>
107        </tr>
108      </table>
109      
110    </td>
111  </tr>
112<tr>
113    <td width="15%" align="right" valign="top" class="summary">
114      <span class="summary-type">&nbsp;</span>
115    </td><td class="summary">
116      <table width="100%" cellpadding="0" cellspacing="0" border="0">
117        <tr>
118          <td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">self</span>,
119        <span class="summary-sig-arg">other</span>)</span></td>
120          <td align="right" valign="top">
121            <span class="codelink"><a href="tagger-pysrc.html#Tag.__eq__">source&nbsp;code</a></span>
122            
123          </td>
124        </tr>
125      </table>
126      
127    </td>
128  </tr>
129<tr>
130    <td width="15%" align="right" valign="top" class="summary">
131      <span class="summary-type">&nbsp;</span>
132    </td><td class="summary">
133      <table width="100%" cellpadding="0" cellspacing="0" border="0">
134        <tr>
135          <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td>
136          <td align="right" valign="top">
137            <span class="codelink"><a href="tagger-pysrc.html#Tag.__repr__">source&nbsp;code</a></span>
138            
139          </td>
140        </tr>
141      </table>
142      
143    </td>
144  </tr>
145<tr>
146    <td width="15%" align="right" valign="top" class="summary">
147      <span class="summary-type">&nbsp;</span>
148    </td><td class="summary">
149      <table width="100%" cellpadding="0" cellspacing="0" border="0">
150        <tr>
151          <td><span class="summary-sig"><a name="__lt__"></a><span class="summary-sig-name">__lt__</span>(<span class="summary-sig-arg">self</span>,
152        <span class="summary-sig-arg">other</span>)</span></td>
153          <td align="right" valign="top">
154            <span class="codelink"><a href="tagger-pysrc.html#Tag.__lt__">source&nbsp;code</a></span>
155            
156          </td>
157        </tr>
158      </table>
159      
160    </td>
161  </tr>
162<tr>
163    <td width="15%" align="right" valign="top" class="summary">
164      <span class="summary-type">&nbsp;</span>
165    </td><td class="summary">
166      <table width="100%" cellpadding="0" cellspacing="0" border="0">
167        <tr>
168          <td><span class="summary-sig"><a name="__hash__"></a><span class="summary-sig-name">__hash__</span>(<span class="summary-sig-arg">self</span>)</span></td>
169          <td align="right" valign="top">
170            <span class="codelink"><a href="tagger-pysrc.html#Tag.__hash__">source&nbsp;code</a></span>
171            
172          </td>
173        </tr>
174      </table>
175      
176    </td>
177  </tr>
178</table>
179<!-- ==================== METHOD DETAILS ==================== -->
180<a name="section-MethodDetails"></a>
181<table class="details" border="1" cellpadding="3"
182       cellspacing="0" width="100%" bgcolor="white">
183<tr bgcolor="#70b0f0" class="table-header">
184  <td colspan="2" class="table-header">
185    <table border="0" cellpadding="0" cellspacing="0" width="100%">
186      <tr valign="top">
187        <td align="left"><span class="table-header">Method Details</span></td>
188        <td align="right" valign="top"
189         ><span class="options">[<a href="#section-MethodDetails"
190         class="privatelink" onclick="toggle_private();"
191         >hide private</a>]</span></td>
192      </tr>
193    </table>
194  </td>
195</tr>
196</table>
197<a name="__init__"></a>
198<div>
199<table class="details" border="1" cellpadding="3"
200       cellspacing="0" width="100%" bgcolor="white">
201<tr><td>
202  <table width="100%" cellpadding="0" cellspacing="0" border="0">
203  <tr valign="top"><td>
204  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
205        <span class="sig-arg">string</span>,
206        <span class="sig-arg">stem</span>=<span class="sig-default">None</span>,
207        <span class="sig-arg">rating</span>=<span class="sig-default">1.0</span>,
208        <span class="sig-arg">proper</span>=<span class="sig-default">False</span>,
209        <span class="sig-arg">terminal</span>=<span class="sig-default">False</span>)</span>
210    <br /><em class="fname">(Constructor)</em>
211  </h3>
212  </td><td align="right" valign="top"
213    ><span class="codelink"><a href="tagger-pysrc.html#Tag.__init__">source&nbsp;code</a></span>&nbsp;
214    </td>
215  </tr></table>
216  
217  
218  <dl class="fields">
219    <dt>Parameters:</dt>
220    <dd><ul class="nomargin-top">
221        <li><strong class="pname"><code>string</code></strong> - the actual representation of the tag</li>
222        <li><strong class="pname"><code>stem</code></strong> - the internal (usually stemmed) representation; tags with the same
223          stem are regarded as equal</li>
224        <li><strong class="pname"><code>rating</code></strong> - a measure of the tag's relevance in the interval [0,1]</li>
225        <li><strong class="pname"><code>proper</code></strong> - whether the tag is a proper noun</li>
226        <li><strong class="pname"><code>terminal</code></strong> - set to True if the tag is at the end of a phrase (or anyway it 
227          cannot be logically merged to the following one)</li>
228    </ul></dd>
229    <dt>Returns:</dt>
230        <dd>a new <a href="tagger.Tag-class.html" class="link">Tag</a> object</dd>
231  </dl>
232</td></tr></table>
233</div>
234<br />
235<!-- ==================== NAVIGATION BAR ==================== -->
236<table class="navbar" border="0" width="100%" cellpadding="0"
237       bgcolor="#a0c0ff" cellspacing="0">
238  <tr valign="middle">
239
240  <!-- Tree link -->
241      <th>&nbsp;&nbsp;&nbsp;<a
242        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
243
244  <!-- Index link -->
245      <th>&nbsp;&nbsp;&nbsp;<a
246        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
247
248  <!-- Help link -->
249      <th>&nbsp;&nbsp;&nbsp;<a
250        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
251
252  <!-- Project homepage -->
253      <th class="navbar" align="right" width="100%">
254        <table border="0" cellpadding="0" cellspacing="0">
255          <tr><th class="navbar" align="center"
256            ><a class="navbar" target="_top" href="http://github.com/apresta/tagger">tagger</a></th>
257          </tr></table></th>
258  </tr>
259</table>
260<table border="0" cellpadding="0" cellspacing="0" width="100%%">
261  <tr>
262    <td align="left" class="footer">
263    Generated by Epydoc 3.0.1 on Fri May 13 11:13:08 2011
264    </td>
265    <td align="right" class="footer">
266      <a target="mainFrame" href="http://epydoc.sourceforge.net"
267        >http://epydoc.sourceforge.net</a>
268    </td>
269  </tr>
270</table>
271
272<script type="text/javascript">
273  <!--
274  // Private objects are initially displayed (because if
275  // javascript is turned off then we want them to be
276  // visible); but by default, we want to hide them.  So hide
277  // them unless we have a cookie that says to show them.
278  checkCookie();
279  // -->
280</script>
281</body>
282</html>