-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathcrfsuite_hpp_api.html
109 lines (107 loc) · 5.37 KB
/
crfsuite_hpp_api.html
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
<!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"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Clause: CRFSuite C++/SWIG API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Clause
 <span id="projectnumber">1.0</span>
</div>
<div id="projectbrief">Chatopera Language Understanding Service.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>首页</span></a></li>
<li class="current"><a href="pages.html"><span>相关页面</span></a></li>
<li><a href="modules.html"><span>模块</span></a></li>
<li><a href="namespaces.html"><span>命名空间</span></a></li>
<li><a href="annotated.html"><span>类</span></a></li>
<li><a href="files.html"><span>文件</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="搜索" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">CRFSuite C++/SWIG API </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="crfsuite_hpp_api_intro"></a>
Introduction</h1>
<p>The CRFSuite C++/SWIG API provides a high-level and easy-to-use library module for a number of programming languages. The C++/SWIG API is a wrapper for the CRFSuite C API.</p><ul>
<li><a class="el" href="group__crfsuite__hpp__api__doc.html">API documentation </a></li>
</ul>
<h1><a class="anchor" id="crfsuite_hpp_api_cpp"></a>
C++ API</h1>
<p>The C++ library is implemented in two header files, <a class="el" href="crfsuite__api_8hpp_source.html">crfsuite_api.hpp</a> and <a class="el" href="crfsuite_8hpp_source.html">crfsuite.hpp</a>. One can use the C++ API only by including <a class="el" href="crfsuite_8hpp_source.html">crfsuite.hpp</a>. The C++ library has a dependency to the CRFSuite C library, which means that the C header file (crfsuite.h) and libcrfsuite library are necessary.</p>
<h1><a class="anchor" id="crfsuite_hpp_api_swig"></a>
SWIG API</h1>
<p>The SWIG API is identical to the C++ API. Currently, the CRFsuite distribution includes a Python module for CRFsuite. Please read README under swig/python directory for the information to build the Python module.</p>
<h2><a class="anchor" id="crfsuite_hpp_api_sample"></a>
Sample code</h2>
<p>This code demonstrates how to use the crfsuite.Trainer object. The script reads a training data from STDIN, trains a model using 'l2sgd' algorithm, and stores the model to a file (the first argument of the commend line).</p>
<div class="fragment"></div><!-- fragment --><p>This code demonstrates how to use the crfsuite.Tagger object. The script loads a model from a file (the first argument of the commend line), reads a data from STDIN, predicts label sequences.</p>
<div class="fragment"></div><!-- fragment --> </div></div><!-- contents -->
<address class="footer">
<small>
Copyright (c) (2019-2020) <a href="https://www.chatopera.com">
北京华夏春松科技有限公司
</a>. All Rights Reserved
</small>
</address>