Struct crfsuite_sys::tag_crfsuite_trainer
[−]
[src]
#[repr(C)]pub struct tag_crfsuite_trainer { pub internal: *mut c_void, pub nref: c_int, pub addref: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> c_int>, pub release: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> c_int>, pub params: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> *mut crfsuite_params_t>, pub set_message_callback: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t, user: *mut c_void, cbm: crfsuite_logging_callback)>, pub train: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t, data: *const crfsuite_data_t, filename: *const c_char, holdout: c_int) -> c_int>, }
CRFSuite trainer interface.
Fields
internal: *mut c_void
Pointer to the internal data (internal use only).
nref: c_int
Reference counter (internal use only).
addref: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> c_int>
Increment the reference counter.
trainer
The pointer to this trainer instance.
Returns the reference count after this increment.
release: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> c_int>
Decrement the reference counter.
trainer
The pointer to this trainer instance.
Returns the reference count after this operation.
params: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t) -> *mut crfsuite_params_t>
Obtain the pointer to crfsuite_params_t interface.
trainer
The pointer to this trainer instance.
Returns crfsuite_params_t* The pointer to crfsuite_params_t.
set_message_callback: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t, user: *mut c_void, cbm: crfsuite_logging_callback)>
Set the callback function and user-defined data.
trainer
The pointer to this trainer instance.user
The pointer to the user-defined data.cbm
The pointer to the callback function.
train: Option<unsafe extern "C" fn(trainer: *mut crfsuite_trainer_t, data: *const crfsuite_data_t, filename: *const c_char, holdout: c_int) -> c_int>
Start a training process.
trainer
The pointer to this trainer instance.data
The poiinter to the data set.filename
The filename to which the trainer stores the model. If an empty string is specified, this function does not sture the model to a file.holdout
The holdout group.
Returns the status code.
Trait Implementations
impl Debug for tag_crfsuite_trainer
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for tag_crfsuite_trainer
[src]
impl Clone for tag_crfsuite_trainer
[src]
fn clone(&self) -> tag_crfsuite_trainer
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more