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

Pointer to the internal data (internal use only).

Reference counter (internal use only).

Increment the reference counter.

tagger The pointer to this tagger instance.

Returns the reference count after this increment.

Decrement the reference counter.

tagger The pointer to this tagger instance.

Returns the reference count after this operation.

Set an instance to the tagger.

  • tagger The pointer to this tagger instance.
  • inst The item sequence to be tagged.

Returns the status code.

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.

Find the Viterbi label sequence.

  • tagger The pointer to this tagger instance.
  • labels The label array that receives the Viterbi label
  • sequence The number of elements in the array must
  • ptr_score The pointer to a float variable that receives the score of the Viterbi label sequence.

Returns the status code.

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.

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.

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.

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]

[src]

Formats the value using the given formatter. Read more

impl Copy for tag_crfsuite_tagger
[src]

impl Clone for tag_crfsuite_tagger
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations