CRFSuite tagger interface. More...
Public Attributes | |
void * | internal |
Pointer to the internal data (internal use only). | |
int | nref |
Reference counter (internal use only). | |
int(* | addref )(crfsuite_tagger_t *tagger) |
Increment the reference counter. | |
int(* | release )(crfsuite_tagger_t *tagger) |
Decrement the reference counter. | |
int(* | set )(crfsuite_tagger_t *tagger, crfsuite_instance_t *inst) |
Set an instance to the tagger. | |
int(* | length )(crfsuite_tagger_t *tagger) |
Obtain the number of items in the current instance. | |
int(* | viterbi )(crfsuite_tagger_t *tagger, int *labels, floatval_t *ptr_score) |
Find the Viterbi label sequence. | |
int(* | score )(crfsuite_tagger_t *tagger, int *path, floatval_t *ptr_score) |
Compute the score of a label sequence. | |
int(* | lognorm )(crfsuite_tagger_t *tagger, floatval_t *ptr_norm) |
Compute the log of the partition factor (normalization constant). | |
int(* | marginal_point )(crfsuite_tagger_t *tagger, int l, int t, floatval_t *ptr_prob) |
Compute the marginal probability of a label at a position. | |
int(* | marginal_path )(crfsuite_tagger_t *tagger, const int *path, int begin, int end, floatval_t *ptr_prob) |
Compute the marginal probability of a partial label sequence. |
CRFSuite tagger interface.
int(* tag_crfsuite_tagger::addref)(crfsuite_tagger_t *tagger) |
Increment the reference counter.
tagger | The pointer to this tagger instance. |
int(* tag_crfsuite_tagger::length)(crfsuite_tagger_t *tagger) |
Obtain the number of items in the current instance.
tagger | The pointer to this tagger instance. |
int(* tag_crfsuite_tagger::lognorm)(crfsuite_tagger_t *tagger, floatval_t *ptr_norm) |
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. |
int(* tag_crfsuite_tagger::marginal_path)(crfsuite_tagger_t *tagger, const int *path, int begin, int end, floatval_t *ptr_prob) |
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. |
int(* tag_crfsuite_tagger::marginal_point)(crfsuite_tagger_t *tagger, int l, int t, floatval_t *ptr_prob) |
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. |
int(* tag_crfsuite_tagger::release)(crfsuite_tagger_t *tagger) |
Decrement the reference counter.
tagger | The pointer to this tagger instance. |
int(* tag_crfsuite_tagger::score)(crfsuite_tagger_t *tagger, int *path, floatval_t *ptr_score) |
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. |
int(* tag_crfsuite_tagger::set)(crfsuite_tagger_t *tagger, crfsuite_instance_t *inst) |
Set an instance to the tagger.
tagger | The pointer to this tagger instance. |
inst | The item sequence to be tagged. |
int(* tag_crfsuite_tagger::viterbi)(crfsuite_tagger_t *tagger, int *labels, floatval_t *ptr_score) |
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 be no smaller than the number of item. |
ptr_score | The pointer to a float variable that receives the score of the Viterbi label sequence. |