1#![allow(non_camel_case_types, non_snake_case)]
4
5#[doc = " DictionaryInfo structure"]
6#[repr(C)]
7#[derive(Debug, Copy, Clone)]
8pub struct mecab_dictionary_info_t {
9 #[doc = " filename of dictionary\n On Windows, filename is stored in UTF-8 encoding"]
10 pub filename: *const ::std::os::raw::c_char,
11 #[doc = " character set of the dictionary. e.g., \"SHIFT-JIS\", \"UTF-8\""]
12 pub charset: *const ::std::os::raw::c_char,
13 #[doc = " How many words are registered in this dictionary."]
14 pub size: ::std::os::raw::c_uint,
15 #[doc = " dictionary type\n this value should be MECAB_USR_DIC, MECAB_SYS_DIC, or MECAB_UNK_DIC."]
16 pub type_: ::std::os::raw::c_int,
17 #[doc = " left attributes size"]
18 pub lsize: ::std::os::raw::c_uint,
19 #[doc = " right attributes size"]
20 pub rsize: ::std::os::raw::c_uint,
21 #[doc = " version of this dictionary"]
22 pub version: ::std::os::raw::c_ushort,
23 #[doc = " pointer to the next dictionary info."]
24 pub next: *mut mecab_dictionary_info_t,
25}
26#[doc = " Path structure"]
27#[repr(C)]
28#[derive(Debug, Copy, Clone)]
29pub struct mecab_path_t {
30 #[doc = " pointer to the right node"]
31 pub rnode: *mut mecab_node_t,
32 #[doc = " pointer to the next right path"]
33 pub rnext: *mut mecab_path_t,
34 #[doc = " pointer to the left node"]
35 pub lnode: *mut mecab_node_t,
36 #[doc = " pointer to the next left path"]
37 pub lnext: *mut mecab_path_t,
38 #[doc = " local cost"]
39 pub cost: ::std::os::raw::c_int,
40 #[doc = " marginal probability"]
41 pub prob: f32,
42}
43#[doc = " Node structure"]
44#[repr(C)]
45#[derive(Debug, Copy, Clone)]
46pub struct mecab_node_t {
47 #[doc = " pointer to the previous node."]
48 pub prev: *mut mecab_node_t,
49 #[doc = " pointer to the next node."]
50 pub next: *mut mecab_node_t,
51 #[doc = " pointer to the node which ends at the same position."]
52 pub enext: *mut mecab_node_t,
53 #[doc = " pointer to the node which starts at the same position."]
54 pub bnext: *mut mecab_node_t,
55 #[doc = " pointer to the right path.\n this value is NULL if MECAB_ONE_BEST mode."]
56 pub rpath: *mut mecab_path_t,
57 #[doc = " pointer to the right path.\n this value is NULL if MECAB_ONE_BEST mode."]
58 pub lpath: *mut mecab_path_t,
59 #[doc = " surface string.\n this value is not 0 terminated.\n You can get the length with length/rlength members."]
60 pub surface: *const ::std::os::raw::c_char,
61 #[doc = " feature string"]
62 pub feature: *const ::std::os::raw::c_char,
63 #[doc = " unique node id"]
64 pub id: ::std::os::raw::c_uint,
65 #[doc = " length of the surface form."]
66 pub length: ::std::os::raw::c_ushort,
67 #[doc = " length of the surface form including white space before the morph."]
68 pub rlength: ::std::os::raw::c_ushort,
69 #[doc = " right attribute id"]
70 pub rcAttr: ::std::os::raw::c_ushort,
71 #[doc = " left attribute id"]
72 pub lcAttr: ::std::os::raw::c_ushort,
73 #[doc = " unique part of speech id. This value is defined in \"pos.def\" file."]
74 pub posid: ::std::os::raw::c_ushort,
75 #[doc = " character type"]
76 pub char_type: ::std::os::raw::c_uchar,
77 #[doc = " status of this model.\n This value is MECAB_NOR_NODE, MECAB_UNK_NODE, MECAB_BOS_NODE, MECAB_EOS_NODE, or MECAB_EON_NODE."]
78 pub stat: ::std::os::raw::c_uchar,
79 #[doc = " set 1 if this node is best node."]
80 pub isbest: ::std::os::raw::c_uchar,
81 #[doc = " forward accumulative log summation.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
82 pub alpha: f32,
83 #[doc = " backward accumulative log summation.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
84 pub beta: f32,
85 #[doc = " marginal probability.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
86 pub prob: f32,
87 #[doc = " word cost."]
88 pub wcost: ::std::os::raw::c_short,
89 #[doc = " best accumulative cost from bos node to this node."]
90 pub cost: ::std::os::raw::c_long,
91}
92#[doc = " Normal node defined in the dictionary."]
93pub const MECAB_NOR_NODE: _bindgen_ty_1 = 0;
94#[doc = " Unknown node not defined in the dictionary."]
95pub const MECAB_UNK_NODE: _bindgen_ty_1 = 1;
96#[doc = " Virtual node representing a beginning of the sentence."]
97pub const MECAB_BOS_NODE: _bindgen_ty_1 = 2;
98#[doc = " Virtual node representing a end of the sentence."]
99pub const MECAB_EOS_NODE: _bindgen_ty_1 = 3;
100#[doc = " Virtual node representing a end of the N-best enumeration."]
101pub const MECAB_EON_NODE: _bindgen_ty_1 = 4;
102#[doc = " Parameters for MeCab::Node::stat"]
103pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
104#[doc = " This is a system dictionary."]
105pub const MECAB_SYS_DIC: _bindgen_ty_2 = 0;
106#[doc = " This is a user dictionary."]
107pub const MECAB_USR_DIC: _bindgen_ty_2 = 1;
108#[doc = " This is a unknown word dictionary."]
109pub const MECAB_UNK_DIC: _bindgen_ty_2 = 2;
110#[doc = " Parameters for MeCab::DictionaryInfo::type"]
111pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
112#[doc = " One best result is obtained (default mode)"]
113pub const MECAB_ONE_BEST: _bindgen_ty_3 = 1;
114#[doc = " Set this flag if you want to obtain N best results."]
115pub const MECAB_NBEST: _bindgen_ty_3 = 2;
116#[doc = " Set this flag if you want to enable a partial parsing mode.\n When this flag is set, the input |sentence| needs to be written\n in partial parsing format."]
117pub const MECAB_PARTIAL: _bindgen_ty_3 = 4;
118#[doc = " Set this flag if you want to obtain marginal probabilities.\n Marginal probability is set in MeCab::Node::prob.\n The parsing speed will get 3-5 times slower than the default mode."]
119pub const MECAB_MARGINAL_PROB: _bindgen_ty_3 = 8;
120#[doc = " Set this flag if you want to obtain alternative results.\n Not implemented."]
121pub const MECAB_ALTERNATIVE: _bindgen_ty_3 = 16;
122#[doc = " When this flag is set, the result linked-list (Node::next/prev)\n traverses all nodes in the lattice."]
123pub const MECAB_ALL_MORPHS: _bindgen_ty_3 = 32;
124#[doc = " When this flag is set, tagger internally copies the body of passed\n sentence into internal buffer."]
125pub const MECAB_ALLOCATE_SENTENCE: _bindgen_ty_3 = 64;
126#[doc = " Parameters for MeCab::Lattice::request_type"]
127pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
128#[doc = " The token boundary is not specified."]
129pub const MECAB_ANY_BOUNDARY: _bindgen_ty_4 = 0;
130#[doc = " The position is a strong token boundary."]
131pub const MECAB_TOKEN_BOUNDARY: _bindgen_ty_4 = 1;
132#[doc = " The position is not a token boundary."]
133pub const MECAB_INSIDE_TOKEN: _bindgen_ty_4 = 2;
134#[doc = " Parameters for MeCab::Lattice::boundary_constraint_type"]
135pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
136#[repr(C)]
137#[derive(Debug, Copy, Clone)]
138pub struct mecab_t {
139 _unused: [u8; 0],
140}
141#[repr(C)]
142#[derive(Debug, Copy, Clone)]
143pub struct mecab_model_t {
144 _unused: [u8; 0],
145}
146#[repr(C)]
147#[derive(Debug, Copy, Clone)]
148pub struct mecab_lattice_t {
149 _unused: [u8; 0],
150}
151unsafe extern "C" {
152 #[doc = " C wrapper of MeCab::Tagger::create(argc, argv)"]
153 pub fn mecab_new(
154 argc: ::std::os::raw::c_int,
155 argv: *mut *mut ::std::os::raw::c_char,
156 ) -> *mut mecab_t;
157}
158unsafe extern "C" {
159 #[doc = " C wrapper of MeCab::Tagger::create(arg)"]
160 pub fn mecab_new2(arg: *const ::std::os::raw::c_char) -> *mut mecab_t;
161}
162unsafe extern "C" {
163 #[doc = " C wrapper of MeCab::Tagger::version()"]
164 pub fn mecab_version() -> *const ::std::os::raw::c_char;
165}
166unsafe extern "C" {
167 #[doc = " C wrapper of MeCab::getLastError()"]
168 pub fn mecab_strerror(mecab: *mut mecab_t) -> *const ::std::os::raw::c_char;
169}
170unsafe extern "C" {
171 #[doc = " C wrapper of MeCab::deleteTagger(tagger)"]
172 pub fn mecab_destroy(mecab: *mut mecab_t);
173}
174unsafe extern "C" {
175 #[doc = " C wrapper of MeCab::Tagger:set_partial()"]
176 pub fn mecab_get_partial(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
177}
178unsafe extern "C" {
179 #[doc = " C wrapper of MeCab::Tagger::partial()"]
180 pub fn mecab_set_partial(mecab: *mut mecab_t, partial: ::std::os::raw::c_int);
181}
182unsafe extern "C" {
183 #[doc = " C wrapper of MeCab::Tagger::theta()"]
184 pub fn mecab_get_theta(mecab: *mut mecab_t) -> f32;
185}
186unsafe extern "C" {
187 #[doc = " C wrapper of MeCab::Tagger::set_theta()"]
188 pub fn mecab_set_theta(mecab: *mut mecab_t, theta: f32);
189}
190unsafe extern "C" {
191 #[doc = " C wrapper of MeCab::Tagger::lattice_level()"]
192 pub fn mecab_get_lattice_level(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
193}
194unsafe extern "C" {
195 #[doc = " C wrapper of MeCab::Tagger::set_lattice_level()"]
196 pub fn mecab_set_lattice_level(mecab: *mut mecab_t, level: ::std::os::raw::c_int);
197}
198unsafe extern "C" {
199 #[doc = " C wrapper of MeCab::Tagger::all_morphs()"]
200 pub fn mecab_get_all_morphs(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
201}
202unsafe extern "C" {
203 #[doc = " C wrapper of MeCab::Tagger::set_all_moprhs()"]
204 pub fn mecab_set_all_morphs(mecab: *mut mecab_t, all_morphs: ::std::os::raw::c_int);
205}
206unsafe extern "C" {
207 #[doc = " C wrapper of MeCab::Tagger::parse(MeCab::Lattice *lattice)"]
208 pub fn mecab_parse_lattice(
209 mecab: *mut mecab_t,
210 lattice: *mut mecab_lattice_t,
211 ) -> ::std::os::raw::c_int;
212}
213unsafe extern "C" {
214 #[doc = " C wrapper of MeCab::Tagger::parse(const char *str)"]
215 pub fn mecab_sparse_tostr(
216 mecab: *mut mecab_t,
217 str_: *const ::std::os::raw::c_char,
218 ) -> *const ::std::os::raw::c_char;
219}
220unsafe extern "C" {
221 #[doc = " C wrapper of MeCab::Tagger::parse(const char *str, size_t len)"]
222 pub fn mecab_sparse_tostr2(
223 mecab: *mut mecab_t,
224 str_: *const ::std::os::raw::c_char,
225 len: usize,
226 ) -> *const ::std::os::raw::c_char;
227}
228unsafe extern "C" {
229 #[doc = " C wrapper of MeCab::Tagger::parse(const char *str, char *ostr, size_t olen)"]
230 pub fn mecab_sparse_tostr3(
231 mecab: *mut mecab_t,
232 str_: *const ::std::os::raw::c_char,
233 len: usize,
234 ostr: *mut ::std::os::raw::c_char,
235 olen: usize,
236 ) -> *mut ::std::os::raw::c_char;
237}
238unsafe extern "C" {
239 #[doc = " C wrapper of MeCab::Tagger::parseToNode(const char *str)"]
240 pub fn mecab_sparse_tonode(
241 mecab: *mut mecab_t,
242 arg1: *const ::std::os::raw::c_char,
243 ) -> *const mecab_node_t;
244}
245unsafe extern "C" {
246 #[doc = " C wrapper of MeCab::Tagger::parseToNode(const char *str, size_t len)"]
247 pub fn mecab_sparse_tonode2(
248 mecab: *mut mecab_t,
249 arg1: *const ::std::os::raw::c_char,
250 arg2: usize,
251 ) -> *const mecab_node_t;
252}
253unsafe extern "C" {
254 #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str)"]
255 pub fn mecab_nbest_sparse_tostr(
256 mecab: *mut mecab_t,
257 N: usize,
258 str_: *const ::std::os::raw::c_char,
259 ) -> *const ::std::os::raw::c_char;
260}
261unsafe extern "C" {
262 #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str, size_t len)"]
263 pub fn mecab_nbest_sparse_tostr2(
264 mecab: *mut mecab_t,
265 N: usize,
266 str_: *const ::std::os::raw::c_char,
267 len: usize,
268 ) -> *const ::std::os::raw::c_char;
269}
270unsafe extern "C" {
271 #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str, char *ostr, size_t olen)"]
272 pub fn mecab_nbest_sparse_tostr3(
273 mecab: *mut mecab_t,
274 N: usize,
275 str_: *const ::std::os::raw::c_char,
276 len: usize,
277 ostr: *mut ::std::os::raw::c_char,
278 olen: usize,
279 ) -> *mut ::std::os::raw::c_char;
280}
281unsafe extern "C" {
282 #[doc = " C wrapper of MeCab::Tagger::parseNBestInit(const char *str)"]
283 pub fn mecab_nbest_init(
284 mecab: *mut mecab_t,
285 str_: *const ::std::os::raw::c_char,
286 ) -> ::std::os::raw::c_int;
287}
288unsafe extern "C" {
289 #[doc = " C wrapper of MeCab::Tagger::parseNBestInit(const char *str, size_t len)"]
290 pub fn mecab_nbest_init2(
291 mecab: *mut mecab_t,
292 str_: *const ::std::os::raw::c_char,
293 len: usize,
294 ) -> ::std::os::raw::c_int;
295}
296unsafe extern "C" {
297 #[doc = " C wrapper of MeCab::Tagger::next()"]
298 pub fn mecab_nbest_next_tostr(mecab: *mut mecab_t) -> *const ::std::os::raw::c_char;
299}
300unsafe extern "C" {
301 #[doc = " C wrapper of MeCab::Tagger::next(char *ostr, size_t olen)"]
302 pub fn mecab_nbest_next_tostr2(
303 mecab: *mut mecab_t,
304 ostr: *mut ::std::os::raw::c_char,
305 olen: usize,
306 ) -> *mut ::std::os::raw::c_char;
307}
308unsafe extern "C" {
309 #[doc = " C wrapper of MeCab::Tagger::nextNode()"]
310 pub fn mecab_nbest_next_tonode(mecab: *mut mecab_t) -> *const mecab_node_t;
311}
312unsafe extern "C" {
313 #[doc = " C wrapper of MeCab::Tagger::formatNode(const Node *node)"]
314 pub fn mecab_format_node(
315 mecab: *mut mecab_t,
316 node: *const mecab_node_t,
317 ) -> *const ::std::os::raw::c_char;
318}
319unsafe extern "C" {
320 #[doc = " C wrapper of MeCab::Tagger::dictionary_info()"]
321 pub fn mecab_dictionary_info(mecab: *mut mecab_t) -> *const mecab_dictionary_info_t;
322}
323unsafe extern "C" {
324 #[doc = " C wrapper of MeCab::createLattice()"]
325 pub fn mecab_lattice_new() -> *mut mecab_lattice_t;
326}
327unsafe extern "C" {
328 #[doc = " C wrapper of MeCab::deleteLattice(lattice)"]
329 pub fn mecab_lattice_destroy(lattice: *mut mecab_lattice_t);
330}
331unsafe extern "C" {
332 #[doc = " C wrapper of MeCab::Lattice::clear()"]
333 pub fn mecab_lattice_clear(lattice: *mut mecab_lattice_t);
334}
335unsafe extern "C" {
336 #[doc = " C wrapper of MeCab::Lattice::is_available()"]
337 pub fn mecab_lattice_is_available(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
338}
339unsafe extern "C" {
340 #[doc = " C wrapper of MeCab::Lattice::bos_node()"]
341 pub fn mecab_lattice_get_bos_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
342}
343unsafe extern "C" {
344 #[doc = " C wrapper of MeCab::Lattice::eos_node()"]
345 pub fn mecab_lattice_get_eos_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
346}
347unsafe extern "C" {
348 #[doc = " C wrapper of MeCab::Lattice::begin_nodes()"]
349 pub fn mecab_lattice_get_all_begin_nodes(
350 lattice: *mut mecab_lattice_t,
351 ) -> *mut *mut mecab_node_t;
352}
353unsafe extern "C" {
354 #[doc = " C wrapper of MeCab::Lattice::end_nodes()"]
355 pub fn mecab_lattice_get_all_end_nodes(lattice: *mut mecab_lattice_t)
356 -> *mut *mut mecab_node_t;
357}
358unsafe extern "C" {
359 #[doc = " C wrapper of MeCab::Lattice::begin_nodes(pos)"]
360 pub fn mecab_lattice_get_begin_nodes(
361 lattice: *mut mecab_lattice_t,
362 pos: usize,
363 ) -> *mut mecab_node_t;
364}
365unsafe extern "C" {
366 #[doc = " C wrapper of MeCab::Lattice::end_nodes(pos)"]
367 pub fn mecab_lattice_get_end_nodes(
368 lattice: *mut mecab_lattice_t,
369 pos: usize,
370 ) -> *mut mecab_node_t;
371}
372unsafe extern "C" {
373 #[doc = " C wrapper of MeCab::Lattice::sentence()"]
374 pub fn mecab_lattice_get_sentence(
375 lattice: *mut mecab_lattice_t,
376 ) -> *const ::std::os::raw::c_char;
377}
378unsafe extern "C" {
379 #[doc = " C wrapper of MeCab::Lattice::set_sentence(sentence)"]
380 pub fn mecab_lattice_set_sentence(
381 lattice: *mut mecab_lattice_t,
382 sentence: *const ::std::os::raw::c_char,
383 );
384}
385unsafe extern "C" {
386 #[doc = " C wrapper of MeCab::Lattice::set_sentence(sentence, len)"]
387 pub fn mecab_lattice_set_sentence2(
388 lattice: *mut mecab_lattice_t,
389 sentence: *const ::std::os::raw::c_char,
390 len: usize,
391 );
392}
393unsafe extern "C" {
394 #[doc = " C wrapper of MeCab::Lattice::size()"]
395 pub fn mecab_lattice_get_size(lattice: *mut mecab_lattice_t) -> usize;
396}
397unsafe extern "C" {
398 #[doc = " C wrapper of MeCab::Lattice::Z()"]
399 pub fn mecab_lattice_get_z(lattice: *mut mecab_lattice_t) -> f64;
400}
401unsafe extern "C" {
402 #[doc = " C wrapper of MeCab::Lattice::set_Z()"]
403 pub fn mecab_lattice_set_z(lattice: *mut mecab_lattice_t, Z: f64);
404}
405unsafe extern "C" {
406 #[doc = " C wrapper of MeCab::Lattice::theta()"]
407 pub fn mecab_lattice_get_theta(lattice: *mut mecab_lattice_t) -> f64;
408}
409unsafe extern "C" {
410 #[doc = " C wrapper of MeCab::Lattice::set_theta()"]
411 pub fn mecab_lattice_set_theta(lattice: *mut mecab_lattice_t, theta: f64);
412}
413unsafe extern "C" {
414 #[doc = " C wrapper of MeCab::Lattice::next()"]
415 pub fn mecab_lattice_next(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
416}
417unsafe extern "C" {
418 #[doc = " C wrapper of MeCab::Lattice::request_type()"]
419 pub fn mecab_lattice_get_request_type(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
420}
421unsafe extern "C" {
422 #[doc = " C wrapper of MeCab::Lattice::has_request_type()"]
423 pub fn mecab_lattice_has_request_type(
424 lattice: *mut mecab_lattice_t,
425 request_type: ::std::os::raw::c_int,
426 ) -> ::std::os::raw::c_int;
427}
428unsafe extern "C" {
429 #[doc = " C wrapper of MeCab::Lattice::set_request_type()"]
430 pub fn mecab_lattice_set_request_type(
431 lattice: *mut mecab_lattice_t,
432 request_type: ::std::os::raw::c_int,
433 );
434}
435unsafe extern "C" {
436 #[doc = " C wrapper of MeCab::Lattice::add_request_type()"]
437 pub fn mecab_lattice_add_request_type(
438 lattice: *mut mecab_lattice_t,
439 request_type: ::std::os::raw::c_int,
440 );
441}
442unsafe extern "C" {
443 #[doc = " C wrapper of MeCab::Lattice::remove_request_type()"]
444 pub fn mecab_lattice_remove_request_type(
445 lattice: *mut mecab_lattice_t,
446 request_type: ::std::os::raw::c_int,
447 );
448}
449unsafe extern "C" {
450 #[doc = " C wrapper of MeCab::Lattice::newNode();"]
451 pub fn mecab_lattice_new_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
452}
453unsafe extern "C" {
454 #[doc = " C wrapper of MeCab::Lattice::toString()"]
455 pub fn mecab_lattice_tostr(lattice: *mut mecab_lattice_t) -> *const ::std::os::raw::c_char;
456}
457unsafe extern "C" {
458 #[doc = " C wrapper of MeCab::Lattice::toString(buf, size)"]
459 pub fn mecab_lattice_tostr2(
460 lattice: *mut mecab_lattice_t,
461 buf: *mut ::std::os::raw::c_char,
462 size: usize,
463 ) -> *const ::std::os::raw::c_char;
464}
465unsafe extern "C" {
466 #[doc = " C wrapper of MeCab::Lattice::enumNBestAsString(N)"]
467 pub fn mecab_lattice_nbest_tostr(
468 lattice: *mut mecab_lattice_t,
469 N: usize,
470 ) -> *const ::std::os::raw::c_char;
471}
472unsafe extern "C" {
473 #[doc = " C wrapper of MeCab::Lattice::enumNBestAsString(N, buf, size)"]
474 pub fn mecab_lattice_nbest_tostr2(
475 lattice: *mut mecab_lattice_t,
476 N: usize,
477 buf: *mut ::std::os::raw::c_char,
478 size: usize,
479 ) -> *const ::std::os::raw::c_char;
480}
481unsafe extern "C" {
482 #[doc = " C wrapper of MeCab::Lattice::has_constraint()"]
483 pub fn mecab_lattice_has_constraint(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
484}
485unsafe extern "C" {
486 #[doc = " C wrapper of MeCab::Lattice::boundary_constraint(pos)"]
487 pub fn mecab_lattice_get_boundary_constraint(
488 lattice: *mut mecab_lattice_t,
489 pos: usize,
490 ) -> ::std::os::raw::c_int;
491}
492unsafe extern "C" {
493 #[doc = " C wrapper of MeCab::Lattice::feature_constraint(pos)"]
494 pub fn mecab_lattice_get_feature_constraint(
495 lattice: *mut mecab_lattice_t,
496 pos: usize,
497 ) -> *const ::std::os::raw::c_char;
498}
499unsafe extern "C" {
500 #[doc = " C wrapper of MeCab::Lattice::boundary_constraint(pos, type)"]
501 pub fn mecab_lattice_set_boundary_constraint(
502 lattice: *mut mecab_lattice_t,
503 pos: usize,
504 boundary_type: ::std::os::raw::c_int,
505 );
506}
507unsafe extern "C" {
508 #[doc = " C wrapper of MeCab::Lattice::set_feature_constraint(begin_pos, end_pos, feature)"]
509 pub fn mecab_lattice_set_feature_constraint(
510 lattice: *mut mecab_lattice_t,
511 begin_pos: usize,
512 end_pos: usize,
513 feature: *const ::std::os::raw::c_char,
514 );
515}
516unsafe extern "C" {
517 #[doc = " C wrapper of MeCab::Lattice::set_result(result);"]
518 pub fn mecab_lattice_set_result(
519 lattice: *mut mecab_lattice_t,
520 result: *const ::std::os::raw::c_char,
521 );
522}
523unsafe extern "C" {
524 #[doc = " C wrapper of MeCab::Lattice::what()"]
525 pub fn mecab_lattice_strerror(lattice: *mut mecab_lattice_t) -> *const ::std::os::raw::c_char;
526}
527unsafe extern "C" {
528 #[doc = " C wapper of MeCab::Model::create(argc, argv)"]
529 pub fn mecab_model_new(
530 argc: ::std::os::raw::c_int,
531 argv: *mut *mut ::std::os::raw::c_char,
532 ) -> *mut mecab_model_t;
533}
534unsafe extern "C" {
535 #[doc = " C wapper of MeCab::Model::create(arg)"]
536 pub fn mecab_model_new2(arg: *const ::std::os::raw::c_char) -> *mut mecab_model_t;
537}
538unsafe extern "C" {
539 #[doc = " C wapper of MeCab::deleteModel(model)"]
540 pub fn mecab_model_destroy(model: *mut mecab_model_t);
541}
542unsafe extern "C" {
543 #[doc = " C wapper of MeCab::Model::createTagger()"]
544 pub fn mecab_model_new_tagger(model: *mut mecab_model_t) -> *mut mecab_t;
545}
546unsafe extern "C" {
547 #[doc = " C wapper of MeCab::Model::createLattice()"]
548 pub fn mecab_model_new_lattice(model: *mut mecab_model_t) -> *mut mecab_lattice_t;
549}
550unsafe extern "C" {
551 #[doc = " C wrapper of MeCab::Model::swap()"]
552 pub fn mecab_model_swap(
553 model: *mut mecab_model_t,
554 new_model: *mut mecab_model_t,
555 ) -> ::std::os::raw::c_int;
556}
557unsafe extern "C" {
558 #[doc = " C wapper of MeCab::Model::dictionary_info()"]
559 pub fn mecab_model_dictionary_info(model: *mut mecab_model_t)
560 -> *const mecab_dictionary_info_t;
561}
562unsafe extern "C" {
563 #[doc = " C wrapper of MeCab::Model::transition_cost()"]
564 pub fn mecab_model_transition_cost(
565 model: *mut mecab_model_t,
566 rcAttr: ::std::os::raw::c_ushort,
567 lcAttr: ::std::os::raw::c_ushort,
568 ) -> ::std::os::raw::c_int;
569}
570unsafe extern "C" {
571 #[doc = " C wrapper of MeCab::Model::lookup()"]
572 pub fn mecab_model_lookup(
573 model: *mut mecab_model_t,
574 begin: *const ::std::os::raw::c_char,
575 end: *const ::std::os::raw::c_char,
576 lattice: *mut mecab_lattice_t,
577 ) -> *mut mecab_node_t;
578}
579unsafe extern "C" {
580 pub fn mecab_do(
581 argc: ::std::os::raw::c_int,
582 argv: *mut *mut ::std::os::raw::c_char,
583 ) -> ::std::os::raw::c_int;
584}
585unsafe extern "C" {
586 pub fn mecab_dict_index(
587 argc: ::std::os::raw::c_int,
588 argv: *mut *mut ::std::os::raw::c_char,
589 ) -> ::std::os::raw::c_int;
590}
591unsafe extern "C" {
592 pub fn mecab_dict_gen(
593 argc: ::std::os::raw::c_int,
594 argv: *mut *mut ::std::os::raw::c_char,
595 ) -> ::std::os::raw::c_int;
596}
597unsafe extern "C" {
598 pub fn mecab_cost_train(
599 argc: ::std::os::raw::c_int,
600 argv: *mut *mut ::std::os::raw::c_char,
601 ) -> ::std::os::raw::c_int;
602}
603unsafe extern "C" {
604 pub fn mecab_system_eval(
605 argc: ::std::os::raw::c_int,
606 argv: *mut *mut ::std::os::raw::c_char,
607 ) -> ::std::os::raw::c_int;
608}
609unsafe extern "C" {
610 pub fn mecab_test_gen(
611 argc: ::std::os::raw::c_int,
612 argv: *mut *mut ::std::os::raw::c_char,
613 ) -> ::std::os::raw::c_int;
614}