Struct crfsuite_sys::tag_crfsuite_tagger
[−]
[src]
#[repr(C)]pub struct tag_crfsuite_tagger { pub internal: *mut c_void, pub nref: c_int, pub addref: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t) -> c_int>, pub release: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t) -> c_int>, pub set: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, inst: *mut crfsuite_instance_t) -> c_int>, pub length: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t) -> c_int>, pub viterbi: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, labels: *mut c_int, ptr_score: *mut floatval_t) -> c_int>, pub score: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, path: *mut c_int, ptr_score: *mut floatval_t) -> c_int>, pub lognorm: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, ptr_norm: *mut floatval_t) -> c_int>, pub marginal_point: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, l: c_int, t: c_int, ptr_prob: *mut floatval_t) -> c_int>, pub marginal_path: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, path: *const c_int, begin: c_int, end: c_int, ptr_prob: *mut floatval_t) -> c_int>, }
CRFSuite tagger 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(tagger: *mut crfsuite_tagger_t) -> c_int>
Increment the reference counter.
tagger
The pointer to this tagger instance.
Returns the reference count after this increment.
release: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t) -> c_int>
Decrement the reference counter.
tagger
The pointer to this tagger instance.
Returns the reference count after this operation.
set: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, inst: *mut crfsuite_instance_t) -> c_int>
Set an instance to the tagger.
tagger
The pointer to this tagger instance.inst
The item sequence to be tagged.
Returns the status code.
length: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t) -> c_int>
Obtain the number of items in the current instance.
tagger
The pointer to this tagger instance.
Returns the number of items of the instance set by set() function.
Returns the status code.
viterbi: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, labels: *mut c_int, ptr_score: *mut floatval_t) -> c_int>
Find the Viterbi label sequence.
tagger
The pointer to this tagger instance.labels
The label array that receives the Viterbi labelsequence
The number of elements in the array mustptr_score
The pointer to a float variable that receives the score of the Viterbi label sequence.
Returns the status code.
score: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, path: *mut c_int, ptr_score: *mut floatval_t) -> c_int>
Compute the score of a label sequence.
tagger
The pointer to this tagger instance.path
The label sequence.ptr_score
The pointer to a float variable that receives the score of the label sequence.
Returns the status code.
lognorm: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, ptr_norm: *mut floatval_t) -> c_int>
Compute the log of the partition factor (normalization constant).
tagger
The pointer to this tagger instance.ptr_score
The pointer to a float variable that receives the logarithm of the partition factor.
Returns the status code.
marginal_point: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, l: c_int, t: c_int, ptr_prob: *mut floatval_t) -> c_int>
Compute the marginal probability of a label at a position.
This function computes P(y_t = l | x), the probability when y_t is the label (l).
tagger
The pointer to this tagger instance.l
The label.t
The position.ptr_prob
The pointer to a float variable that receives the marginal probability.
Returns the status code.
marginal_path: Option<unsafe extern "C" fn(tagger: *mut crfsuite_tagger_t, path: *const c_int, begin: c_int, end: c_int, ptr_prob: *mut floatval_t) -> c_int>
Compute the marginal probability of a partial label sequence.
tagger
The pointer to this tagger instance.path
The partial label sequence.begin
The start position of the partial label sequence.end
The last+1 position of the partial label sequence.ptr_prob
The pointer to a float variable that receives the marginal probability.
Returns the status code.
Trait Implementations
impl Debug for tag_crfsuite_tagger
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for tag_crfsuite_tagger
[src]
impl Clone for tag_crfsuite_tagger
[src]
fn clone(&self) -> tag_crfsuite_tagger
[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