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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>MeCab: MeCab::Model Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">MeCab
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceMeCab.html">MeCab</a> </li>
<li class="navelem"><a class="el" href="classMeCab_1_1Model.html">Model</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">MeCab::Model Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="MeCab::Model" -->
<p><a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> class.
<a href="classMeCab_1_1Model.html#details">More...</a></p>
<p><code>#include <<a class="el" href="mecab_8h_source.html">mecab.h</a>></code></p>
<p><a href="classMeCab_1_1Model-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="namespaceMeCab.html#a581b6e7f533add983ea9dabc4a44166b">DictionaryInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a04a93b36403d155f4cedfb138a7b2b51">dictionary_info</a> () const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return DictionaryInfo linked list. <a href="#a04a93b36403d155f4cedfb138a7b2b51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#ad89d4de4fa9da5e9ac7045e72f2fbb1e">transition_cost</a> (unsigned short rcAttr, unsigned short lcAttr) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return transtion cost from rcAttr to lcAttr. <a href="#ad89d4de4fa9da5e9ac7045e72f2fbb1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceMeCab.html#a3679371b5a373ad35e86a545b5f0d127">Node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#aceb584e540634045adf0172e5fbc59a7">lookup</a> (const char *begin, const char *end, <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> *lattice) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">perform common prefix search from the range [begin, end). <a href="#aceb584e540634045adf0172e5fbc59a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classMeCab_1_1Tagger.html">Tagger</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1">createTagger</a> () const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object. <a href="#a9d9135a4431adb3a985153cb4ab8f3a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#aa70febf1573213287214a1fa626e186d">createLattice</a> () const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object. <a href="#aa70febf1573213287214a1fa626e186d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a0423e56cbbec00e974b75bd1dfed3642">swap</a> (<a class="el" href="classMeCab_1_1Model.html">Model</a> *model)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Swap the instance with |model|. <a href="#a0423e56cbbec00e974b75bd1dfed3642"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#abccfe166fbb9db7ab5fe8479657dd63c">~Model</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#af6d63f8eb887b8b147bdb87a34b06bee">version</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a version string. <a href="#af6d63f8eb887b8b147bdb87a34b06bee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classMeCab_1_1Model.html">Model</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">create</a> (int argc, char **argv)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a specified main's argc/argv-style parameters. <a href="#a90cf2948b06f72de9e07383363fe5d90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classMeCab_1_1Model.html">Model</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#ac17ea89f12a392ca5d1d1bfcf7a89584">create</a> (const char *arg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen". <a href="#ac17ea89f12a392ca5d1d1bfcf7a89584"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> class. </p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="abccfe166fbb9db7ab5fe8479657dd63c"></a><!-- doxytag: member="MeCab::Model::~Model" ref="abccfe166fbb9db7ab5fe8479657dd63c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classMeCab_1_1Model.html#abccfe166fbb9db7ab5fe8479657dd63c">MeCab::Model::~Model</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a90cf2948b06f72de9e07383363fe5d90"></a><!-- doxytag: member="MeCab::Model::create" ref="a90cf2948b06f72de9e07383363fe5d90" args="(int argc, char **argv)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classMeCab_1_1Model.html">Model</a>* <a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">MeCab::Model::create</a> </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a specified main's argc/argv-style parameters. </p>
<p>Return NULL if new model cannot be initialized. Use <a class="el" href="namespaceMeCab.html#af6b513c7789770d47bdf64f9b86f8445" title="Return last error string.">MeCab::getLastError()</a> to obtain the cause of the errors. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> object </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">argc</td><td>number of parameters </td></tr>
<tr><td class="paramname">argv</td><td>parameter list </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac17ea89f12a392ca5d1d1bfcf7a89584"></a><!-- doxytag: member="MeCab::Model::create" ref="ac17ea89f12a392ca5d1d1bfcf7a89584" args="(const char *arg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classMeCab_1_1Model.html">Model</a>* <a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">MeCab::Model::create</a> </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>arg</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen". </p>
<p>Return NULL if new model cannot be initialized. Use <a class="el" href="namespaceMeCab.html#af6b513c7789770d47bdf64f9b86f8445" title="Return last error string.">MeCab::getLastError()</a> to obtain the cause of the errors. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> object </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">arg</td><td>single string representation of the argment. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa70febf1573213287214a1fa626e186d"></a><!-- doxytag: member="MeCab::Model::createLattice" ref="aa70febf1573213287214a1fa626e186d" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a>* <a class="el" href="classMeCab_1_1Model.html#aa70febf1573213287214a1fa626e186d">MeCab::Model::createLattice</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object </dd></dl>
</div>
</div>
<a class="anchor" id="a9d9135a4431adb3a985153cb4ab8f3a1"></a><!-- doxytag: member="MeCab::Model::createTagger" ref="a9d9135a4431adb3a985153cb4ab8f3a1" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classMeCab_1_1Tagger.html">Tagger</a>* <a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1">MeCab::Model::createTagger</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object. </p>
<p>All returned tagger object shares this model object as a parsing model. Never delete this model object before deleting tagger object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object </dd></dl>
</div>
</div>
<a class="anchor" id="a04a93b36403d155f4cedfb138a7b2b51"></a><!-- doxytag: member="MeCab::Model::dictionary_info" ref="a04a93b36403d155f4cedfb138a7b2b51" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual const <a class="el" href="namespaceMeCab.html#a581b6e7f533add983ea9dabc4a44166b">DictionaryInfo</a>* <a class="el" href="classMeCab_1_1Model.html#a04a93b36403d155f4cedfb138a7b2b51">MeCab::Model::dictionary_info</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return DictionaryInfo linked list. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>DictionaryInfo linked list </dd></dl>
</div>
</div>
<a class="anchor" id="aceb584e540634045adf0172e5fbc59a7"></a><!-- doxytag: member="MeCab::Model::lookup" ref="aceb584e540634045adf0172e5fbc59a7" args="(const char *begin, const char *end, Lattice *lattice) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="namespaceMeCab.html#a3679371b5a373ad35e86a545b5f0d127">Node</a>* <a class="el" href="classMeCab_1_1Model.html#aceb584e540634045adf0172e5fbc59a7">MeCab::Model::lookup</a> </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>end</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> * </td>
<td class="paramname"><em>lattice</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>perform common prefix search from the range [begin, end). </p>
<p>|lattice| takes the ownership of return value. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>node linked list. </dd></dl>
</div>
</div>
<a class="anchor" id="a0423e56cbbec00e974b75bd1dfed3642"></a><!-- doxytag: member="MeCab::Model::swap" ref="a0423e56cbbec00e974b75bd1dfed3642" args="(Model *model)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool <a class="el" href="classMeCab_1_1Model.html#a0423e56cbbec00e974b75bd1dfed3642">MeCab::Model::swap</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classMeCab_1_1Model.html">Model</a> * </td>
<td class="paramname"><em>model</em></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Swap the instance with |model|. </p>
<p>The ownership of |model| always moves to this instance, meaning that passed |model| will no longer be accessible after calling this method. return true if new model is swapped successfully. This method is thread safe. All taggers created by <a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1" title="Create a new Tagger object.">Model::createTagger()</a> method will also be updated asynchronously. No need to stop the parsing thread excplicitly before swapping model object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>boolean </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">model</td><td>new model which is going to be swapped with the current model. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad89d4de4fa9da5e9ac7045e72f2fbb1e"></a><!-- doxytag: member="MeCab::Model::transition_cost" ref="ad89d4de4fa9da5e9ac7045e72f2fbb1e" args="(unsigned short rcAttr, unsigned short lcAttr) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int <a class="el" href="classMeCab_1_1Model.html#ad89d4de4fa9da5e9ac7045e72f2fbb1e">MeCab::Model::transition_cost</a> </td>
<td>(</td>
<td class="paramtype">unsigned short </td>
<td class="paramname"><em>rcAttr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned short </td>
<td class="paramname"><em>lcAttr</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return transtion cost from rcAttr to lcAttr. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>transtion cost </dd></dl>
</div>
</div>
<a class="anchor" id="af6d63f8eb887b8b147bdb87a34b06bee"></a><!-- doxytag: member="MeCab::Model::version" ref="af6d63f8eb887b8b147bdb87a34b06bee" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static const char* <a class="el" href="classMeCab_1_1Model.html#af6d63f8eb887b8b147bdb87a34b06bee">MeCab::Model::version</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return a version string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>version string </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/taku/proj/mecab/mecab/src/<a class="el" href="mecab_8h_source.html">mecab.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 18 2013 02:23:58 for MeCab by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>
|