sentencepiece-sys 0.13.1

Binding for the sentencepiece tokenizer
Documentation
/* automatically generated by rust-bindgen 0.66.1 */

pub const __bool_true_false_are_defined: u32 = 1;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1;
pub const _SAL_VERSION: u32 = 20;
pub const __SAL_H_VERSION: u32 = 180000000;
pub const _USE_DECLSPECS_FOR_SAL: u32 = 0;
pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0;
pub const _CRT_PACKING: u32 = 8;
pub const _HAS_EXCEPTIONS: u32 = 1;
pub const _STL_LANG: u32 = 0;
pub const _HAS_CXX17: u32 = 0;
pub const _HAS_CXX20: u32 = 0;
pub const _HAS_CXX23: u32 = 0;
pub const _HAS_NODISCARD: u32 = 0;
pub const WCHAR_MIN: u32 = 0;
pub const WCHAR_MAX: u32 = 65535;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 65535;
pub type wchar_t = ::std::os::raw::c_ushort;
pub type max_align_t = f64;
pub type va_list = *mut ::std::os::raw::c_char;
extern "C" {
    pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
}
pub type __vcrt_bool = bool;
extern "C" {
    pub fn __security_init_cookie();
}
extern "C" {
    pub fn __security_check_cookie(_StackCookie: usize);
}
extern "C" {
    pub fn __report_gsfailure(_StackCookie: usize) -> !;
}
extern "C" {
    pub static mut __security_cookie: usize;
}
pub type int_least8_t = ::std::os::raw::c_schar;
pub type int_least16_t = ::std::os::raw::c_short;
pub type int_least32_t = ::std::os::raw::c_int;
pub type int_least64_t = ::std::os::raw::c_longlong;
pub type uint_least8_t = ::std::os::raw::c_uchar;
pub type uint_least16_t = ::std::os::raw::c_ushort;
pub type uint_least32_t = ::std::os::raw::c_uint;
pub type uint_least64_t = ::std::os::raw::c_ulonglong;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_int;
pub type int_fast32_t = ::std::os::raw::c_int;
pub type int_fast64_t = ::std::os::raw::c_longlong;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_uint;
pub type uint_fast32_t = ::std::os::raw::c_uint;
pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
pub type intmax_t = ::std::os::raw::c_longlong;
pub type uintmax_t = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SentencePieceProcessor {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SentencePieceText {
    _unused: [u8; 0],
}
extern "C" {
    pub fn spp_decode_piece_ids(
        spp: *mut SentencePieceProcessor,
        pieces: *const u32,
        pieces_len: usize,
        decoded: *mut *mut ::std::os::raw::c_uchar,
        decoded_len: *mut usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_decode_pieces(
        spp: *mut SentencePieceProcessor,
        pieces: *const *const ::std::os::raw::c_char,
        pieces_len: usize,
        decoded: *mut *mut ::std::os::raw::c_uchar,
        decoded_len: *mut usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_encode_as_serialized_proto(
        spp: *mut SentencePieceProcessor,
        sentence: *const ::std::os::raw::c_char,
        sentence_len: usize,
        len: *mut usize,
    ) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
    pub fn spp_sample_encode_as_serialized_proto(
        spp: *mut SentencePieceProcessor,
        sentence: *const ::std::os::raw::c_char,
        sentence_len: usize,
        len: *mut usize,
        nbest: usize,
        alpha: f32,
    ) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
    pub fn spp_new() -> *mut SentencePieceProcessor;
}
extern "C" {
    pub fn spp_from_serialized_proto(
        spp: *mut SentencePieceProcessor,
        data: *const ::std::os::raw::c_char,
        len: usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_to_serialized_proto(
        spp: *mut SentencePieceProcessor,
        len: *mut usize,
    ) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
    pub fn spp_load(
        spp: *mut SentencePieceProcessor,
        filename: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_free(spp: *mut SentencePieceProcessor);
}
extern "C" {
    pub fn spp_bos_id(spp: *mut SentencePieceProcessor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_eos_id(spp: *mut SentencePieceProcessor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_is_unknown(spp: *mut SentencePieceProcessor, id: ::std::os::raw::c_int) -> bool;
}
extern "C" {
    pub fn spp_pad_id(spp: *mut SentencePieceProcessor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_piece_to_id(
        spp: *mut SentencePieceProcessor,
        piece: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_piece_size(spp: *mut SentencePieceProcessor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_unk_id(spp: *mut SentencePieceProcessor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_normalize(
        spp: *mut SentencePieceProcessor,
        sentence: *const ::std::os::raw::c_char,
        sentence_len: usize,
        normalized: *mut *mut ::std::os::raw::c_uchar,
        normalized_len: *mut usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn spp_normalize_with_offsets(
        spp: *mut SentencePieceProcessor,
        sentence: *const ::std::os::raw::c_char,
        sentence_len: usize,
        normalized: *mut *mut ::std::os::raw::c_uchar,
        normalized_len: *mut usize,
        offsets: *mut *mut usize,
        offsets_len: *mut usize,
    ) -> ::std::os::raw::c_int;
}