mecab-sys 0.1.0

FFI binding and safe wrappers of MeCab
Documentation
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
/* automatically generated by rust-bindgen 0.72.1 */

#![allow(non_camel_case_types, non_snake_case)]

#[doc = " DictionaryInfo structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_dictionary_info_t {
    #[doc = " filename of dictionary\n On Windows, filename is stored in UTF-8 encoding"]
    pub filename: *const ::std::os::raw::c_char,
    #[doc = " character set of the dictionary. e.g., \"SHIFT-JIS\", \"UTF-8\""]
    pub charset: *const ::std::os::raw::c_char,
    #[doc = " How many words are registered in this dictionary."]
    pub size: ::std::os::raw::c_uint,
    #[doc = " dictionary type\n this value should be MECAB_USR_DIC, MECAB_SYS_DIC, or MECAB_UNK_DIC."]
    pub type_: ::std::os::raw::c_int,
    #[doc = " left attributes size"]
    pub lsize: ::std::os::raw::c_uint,
    #[doc = " right attributes size"]
    pub rsize: ::std::os::raw::c_uint,
    #[doc = " version of this dictionary"]
    pub version: ::std::os::raw::c_ushort,
    #[doc = " pointer to the next dictionary info."]
    pub next: *mut mecab_dictionary_info_t,
}
#[doc = " Path structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_path_t {
    #[doc = " pointer to the right node"]
    pub rnode: *mut mecab_node_t,
    #[doc = " pointer to the next right path"]
    pub rnext: *mut mecab_path_t,
    #[doc = " pointer to the left node"]
    pub lnode: *mut mecab_node_t,
    #[doc = " pointer to the next left path"]
    pub lnext: *mut mecab_path_t,
    #[doc = " local cost"]
    pub cost: ::std::os::raw::c_int,
    #[doc = " marginal probability"]
    pub prob: f32,
}
#[doc = " Node structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_node_t {
    #[doc = " pointer to the previous node."]
    pub prev: *mut mecab_node_t,
    #[doc = " pointer to the next node."]
    pub next: *mut mecab_node_t,
    #[doc = " pointer to the node which ends at the same position."]
    pub enext: *mut mecab_node_t,
    #[doc = " pointer to the node which starts at the same position."]
    pub bnext: *mut mecab_node_t,
    #[doc = " pointer to the right path.\n this value is NULL if MECAB_ONE_BEST mode."]
    pub rpath: *mut mecab_path_t,
    #[doc = " pointer to the right path.\n this value is NULL if MECAB_ONE_BEST mode."]
    pub lpath: *mut mecab_path_t,
    #[doc = " surface string.\n this value is not 0 terminated.\n You can get the length with length/rlength members."]
    pub surface: *const ::std::os::raw::c_char,
    #[doc = " feature string"]
    pub feature: *const ::std::os::raw::c_char,
    #[doc = " unique node id"]
    pub id: ::std::os::raw::c_uint,
    #[doc = " length of the surface form."]
    pub length: ::std::os::raw::c_ushort,
    #[doc = " length of the surface form including white space before the morph."]
    pub rlength: ::std::os::raw::c_ushort,
    #[doc = " right attribute id"]
    pub rcAttr: ::std::os::raw::c_ushort,
    #[doc = " left attribute id"]
    pub lcAttr: ::std::os::raw::c_ushort,
    #[doc = " unique part of speech id. This value is defined in \"pos.def\" file."]
    pub posid: ::std::os::raw::c_ushort,
    #[doc = " character type"]
    pub char_type: ::std::os::raw::c_uchar,
    #[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."]
    pub stat: ::std::os::raw::c_uchar,
    #[doc = " set 1 if this node is best node."]
    pub isbest: ::std::os::raw::c_uchar,
    #[doc = " forward accumulative log summation.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
    pub alpha: f32,
    #[doc = " backward accumulative log summation.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
    pub beta: f32,
    #[doc = " marginal probability.\n This value is only available when MECAB_MARGINAL_PROB is passed."]
    pub prob: f32,
    #[doc = " word cost."]
    pub wcost: ::std::os::raw::c_short,
    #[doc = " best accumulative cost from bos node to this node."]
    pub cost: ::std::os::raw::c_long,
}
#[doc = " Normal node defined in the dictionary."]
pub const MECAB_NOR_NODE: _bindgen_ty_1 = 0;
#[doc = " Unknown node not defined in the dictionary."]
pub const MECAB_UNK_NODE: _bindgen_ty_1 = 1;
#[doc = " Virtual node representing a beginning of the sentence."]
pub const MECAB_BOS_NODE: _bindgen_ty_1 = 2;
#[doc = " Virtual node representing a end of the sentence."]
pub const MECAB_EOS_NODE: _bindgen_ty_1 = 3;
#[doc = " Virtual node representing a end of the N-best enumeration."]
pub const MECAB_EON_NODE: _bindgen_ty_1 = 4;
#[doc = " Parameters for MeCab::Node::stat"]
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[doc = " This is a system dictionary."]
pub const MECAB_SYS_DIC: _bindgen_ty_2 = 0;
#[doc = " This is a user dictionary."]
pub const MECAB_USR_DIC: _bindgen_ty_2 = 1;
#[doc = " This is a unknown word dictionary."]
pub const MECAB_UNK_DIC: _bindgen_ty_2 = 2;
#[doc = " Parameters for MeCab::DictionaryInfo::type"]
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
#[doc = " One best result is obtained (default mode)"]
pub const MECAB_ONE_BEST: _bindgen_ty_3 = 1;
#[doc = " Set this flag if you want to obtain N best results."]
pub const MECAB_NBEST: _bindgen_ty_3 = 2;
#[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."]
pub const MECAB_PARTIAL: _bindgen_ty_3 = 4;
#[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."]
pub const MECAB_MARGINAL_PROB: _bindgen_ty_3 = 8;
#[doc = " Set this flag if you want to obtain alternative results.\n Not implemented."]
pub const MECAB_ALTERNATIVE: _bindgen_ty_3 = 16;
#[doc = " When this flag is set, the result linked-list (Node::next/prev)\n traverses all nodes in the lattice."]
pub const MECAB_ALL_MORPHS: _bindgen_ty_3 = 32;
#[doc = " When this flag is set, tagger internally copies the body of passed\n sentence into internal buffer."]
pub const MECAB_ALLOCATE_SENTENCE: _bindgen_ty_3 = 64;
#[doc = " Parameters for MeCab::Lattice::request_type"]
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
#[doc = " The token boundary is not specified."]
pub const MECAB_ANY_BOUNDARY: _bindgen_ty_4 = 0;
#[doc = " The position is a strong token boundary."]
pub const MECAB_TOKEN_BOUNDARY: _bindgen_ty_4 = 1;
#[doc = " The position is not a token boundary."]
pub const MECAB_INSIDE_TOKEN: _bindgen_ty_4 = 2;
#[doc = " Parameters for MeCab::Lattice::boundary_constraint_type"]
pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_t {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_model_t {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mecab_lattice_t {
    _unused: [u8; 0],
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::create(argc, argv)"]
    pub fn mecab_new(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> *mut mecab_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::create(arg)"]
    pub fn mecab_new2(arg: *const ::std::os::raw::c_char) -> *mut mecab_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::version()"]
    pub fn mecab_version() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::getLastError()"]
    pub fn mecab_strerror(mecab: *mut mecab_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::deleteTagger(tagger)"]
    pub fn mecab_destroy(mecab: *mut mecab_t);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger:set_partial()"]
    pub fn mecab_get_partial(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::partial()"]
    pub fn mecab_set_partial(mecab: *mut mecab_t, partial: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::theta()"]
    pub fn mecab_get_theta(mecab: *mut mecab_t) -> f32;
}
unsafe extern "C" {
    #[doc = " C wrapper of  MeCab::Tagger::set_theta()"]
    pub fn mecab_set_theta(mecab: *mut mecab_t, theta: f32);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::lattice_level()"]
    pub fn mecab_get_lattice_level(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::set_lattice_level()"]
    pub fn mecab_set_lattice_level(mecab: *mut mecab_t, level: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::all_morphs()"]
    pub fn mecab_get_all_morphs(mecab: *mut mecab_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::set_all_moprhs()"]
    pub fn mecab_set_all_morphs(mecab: *mut mecab_t, all_morphs: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parse(MeCab::Lattice *lattice)"]
    pub fn mecab_parse_lattice(
        mecab: *mut mecab_t,
        lattice: *mut mecab_lattice_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parse(const char *str)"]
    pub fn mecab_sparse_tostr(
        mecab: *mut mecab_t,
        str_: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parse(const char *str, size_t len)"]
    pub fn mecab_sparse_tostr2(
        mecab: *mut mecab_t,
        str_: *const ::std::os::raw::c_char,
        len: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parse(const char *str, char *ostr, size_t olen)"]
    pub fn mecab_sparse_tostr3(
        mecab: *mut mecab_t,
        str_: *const ::std::os::raw::c_char,
        len: usize,
        ostr: *mut ::std::os::raw::c_char,
        olen: usize,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseToNode(const char *str)"]
    pub fn mecab_sparse_tonode(
        mecab: *mut mecab_t,
        arg1: *const ::std::os::raw::c_char,
    ) -> *const mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseToNode(const char *str, size_t len)"]
    pub fn mecab_sparse_tonode2(
        mecab: *mut mecab_t,
        arg1: *const ::std::os::raw::c_char,
        arg2: usize,
    ) -> *const mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str)"]
    pub fn mecab_nbest_sparse_tostr(
        mecab: *mut mecab_t,
        N: usize,
        str_: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str, size_t len)"]
    pub fn mecab_nbest_sparse_tostr2(
        mecab: *mut mecab_t,
        N: usize,
        str_: *const ::std::os::raw::c_char,
        len: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseNBest(size_t N, const char *str, char *ostr, size_t olen)"]
    pub fn mecab_nbest_sparse_tostr3(
        mecab: *mut mecab_t,
        N: usize,
        str_: *const ::std::os::raw::c_char,
        len: usize,
        ostr: *mut ::std::os::raw::c_char,
        olen: usize,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseNBestInit(const char *str)"]
    pub fn mecab_nbest_init(
        mecab: *mut mecab_t,
        str_: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::parseNBestInit(const char *str, size_t len)"]
    pub fn mecab_nbest_init2(
        mecab: *mut mecab_t,
        str_: *const ::std::os::raw::c_char,
        len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::next()"]
    pub fn mecab_nbest_next_tostr(mecab: *mut mecab_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::next(char *ostr, size_t olen)"]
    pub fn mecab_nbest_next_tostr2(
        mecab: *mut mecab_t,
        ostr: *mut ::std::os::raw::c_char,
        olen: usize,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::nextNode()"]
    pub fn mecab_nbest_next_tonode(mecab: *mut mecab_t) -> *const mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::formatNode(const Node *node)"]
    pub fn mecab_format_node(
        mecab: *mut mecab_t,
        node: *const mecab_node_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Tagger::dictionary_info()"]
    pub fn mecab_dictionary_info(mecab: *mut mecab_t) -> *const mecab_dictionary_info_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::createLattice()"]
    pub fn mecab_lattice_new() -> *mut mecab_lattice_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::deleteLattice(lattice)"]
    pub fn mecab_lattice_destroy(lattice: *mut mecab_lattice_t);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::clear()"]
    pub fn mecab_lattice_clear(lattice: *mut mecab_lattice_t);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::is_available()"]
    pub fn mecab_lattice_is_available(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::bos_node()"]
    pub fn mecab_lattice_get_bos_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::eos_node()"]
    pub fn mecab_lattice_get_eos_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::begin_nodes()"]
    pub fn mecab_lattice_get_all_begin_nodes(
        lattice: *mut mecab_lattice_t,
    ) -> *mut *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::end_nodes()"]
    pub fn mecab_lattice_get_all_end_nodes(lattice: *mut mecab_lattice_t)
        -> *mut *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::begin_nodes(pos)"]
    pub fn mecab_lattice_get_begin_nodes(
        lattice: *mut mecab_lattice_t,
        pos: usize,
    ) -> *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::end_nodes(pos)"]
    pub fn mecab_lattice_get_end_nodes(
        lattice: *mut mecab_lattice_t,
        pos: usize,
    ) -> *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::sentence()"]
    pub fn mecab_lattice_get_sentence(
        lattice: *mut mecab_lattice_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_sentence(sentence)"]
    pub fn mecab_lattice_set_sentence(
        lattice: *mut mecab_lattice_t,
        sentence: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_sentence(sentence, len)"]
    pub fn mecab_lattice_set_sentence2(
        lattice: *mut mecab_lattice_t,
        sentence: *const ::std::os::raw::c_char,
        len: usize,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::size()"]
    pub fn mecab_lattice_get_size(lattice: *mut mecab_lattice_t) -> usize;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::Z()"]
    pub fn mecab_lattice_get_z(lattice: *mut mecab_lattice_t) -> f64;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_Z()"]
    pub fn mecab_lattice_set_z(lattice: *mut mecab_lattice_t, Z: f64);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::theta()"]
    pub fn mecab_lattice_get_theta(lattice: *mut mecab_lattice_t) -> f64;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_theta()"]
    pub fn mecab_lattice_set_theta(lattice: *mut mecab_lattice_t, theta: f64);
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::next()"]
    pub fn mecab_lattice_next(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::request_type()"]
    pub fn mecab_lattice_get_request_type(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::has_request_type()"]
    pub fn mecab_lattice_has_request_type(
        lattice: *mut mecab_lattice_t,
        request_type: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_request_type()"]
    pub fn mecab_lattice_set_request_type(
        lattice: *mut mecab_lattice_t,
        request_type: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::add_request_type()"]
    pub fn mecab_lattice_add_request_type(
        lattice: *mut mecab_lattice_t,
        request_type: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::remove_request_type()"]
    pub fn mecab_lattice_remove_request_type(
        lattice: *mut mecab_lattice_t,
        request_type: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::newNode();"]
    pub fn mecab_lattice_new_node(lattice: *mut mecab_lattice_t) -> *mut mecab_node_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::toString()"]
    pub fn mecab_lattice_tostr(lattice: *mut mecab_lattice_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::toString(buf, size)"]
    pub fn mecab_lattice_tostr2(
        lattice: *mut mecab_lattice_t,
        buf: *mut ::std::os::raw::c_char,
        size: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::enumNBestAsString(N)"]
    pub fn mecab_lattice_nbest_tostr(
        lattice: *mut mecab_lattice_t,
        N: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::enumNBestAsString(N, buf, size)"]
    pub fn mecab_lattice_nbest_tostr2(
        lattice: *mut mecab_lattice_t,
        N: usize,
        buf: *mut ::std::os::raw::c_char,
        size: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::has_constraint()"]
    pub fn mecab_lattice_has_constraint(lattice: *mut mecab_lattice_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::boundary_constraint(pos)"]
    pub fn mecab_lattice_get_boundary_constraint(
        lattice: *mut mecab_lattice_t,
        pos: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::feature_constraint(pos)"]
    pub fn mecab_lattice_get_feature_constraint(
        lattice: *mut mecab_lattice_t,
        pos: usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::boundary_constraint(pos, type)"]
    pub fn mecab_lattice_set_boundary_constraint(
        lattice: *mut mecab_lattice_t,
        pos: usize,
        boundary_type: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_feature_constraint(begin_pos, end_pos, feature)"]
    pub fn mecab_lattice_set_feature_constraint(
        lattice: *mut mecab_lattice_t,
        begin_pos: usize,
        end_pos: usize,
        feature: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::set_result(result);"]
    pub fn mecab_lattice_set_result(
        lattice: *mut mecab_lattice_t,
        result: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Lattice::what()"]
    pub fn mecab_lattice_strerror(lattice: *mut mecab_lattice_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::Model::create(argc, argv)"]
    pub fn mecab_model_new(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> *mut mecab_model_t;
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::Model::create(arg)"]
    pub fn mecab_model_new2(arg: *const ::std::os::raw::c_char) -> *mut mecab_model_t;
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::deleteModel(model)"]
    pub fn mecab_model_destroy(model: *mut mecab_model_t);
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::Model::createTagger()"]
    pub fn mecab_model_new_tagger(model: *mut mecab_model_t) -> *mut mecab_t;
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::Model::createLattice()"]
    pub fn mecab_model_new_lattice(model: *mut mecab_model_t) -> *mut mecab_lattice_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Model::swap()"]
    pub fn mecab_model_swap(
        model: *mut mecab_model_t,
        new_model: *mut mecab_model_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wapper of MeCab::Model::dictionary_info()"]
    pub fn mecab_model_dictionary_info(model: *mut mecab_model_t)
        -> *const mecab_dictionary_info_t;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Model::transition_cost()"]
    pub fn mecab_model_transition_cost(
        model: *mut mecab_model_t,
        rcAttr: ::std::os::raw::c_ushort,
        lcAttr: ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " C wrapper of MeCab::Model::lookup()"]
    pub fn mecab_model_lookup(
        model: *mut mecab_model_t,
        begin: *const ::std::os::raw::c_char,
        end: *const ::std::os::raw::c_char,
        lattice: *mut mecab_lattice_t,
    ) -> *mut mecab_node_t;
}
unsafe extern "C" {
    pub fn mecab_do(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mecab_dict_index(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mecab_dict_gen(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mecab_cost_train(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mecab_system_eval(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mecab_test_gen(
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}