Public Attributes
tag_crfsuite_tagger Struct Reference

CRFSuite tagger interface. More...

List of all members.

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.

Detailed Description

CRFSuite tagger interface.


Member Data Documentation

Increment the reference counter.

Parameters:
taggerThe pointer to this tagger instance.
Returns:
int The reference count after this increment.

Obtain the number of items in the current instance.

Parameters:
taggerThe pointer to this tagger instance.
Returns:
int The number of items of the instance set by set() function.
int The status code.

Compute the log of the partition factor (normalization constant).

Parameters:
taggerThe pointer to this tagger instance.
ptr_scoreThe pointer to a float variable that receives the logarithm of the partition factor.
Returns:
int The status code.
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.

Parameters:
taggerThe pointer to this tagger instance.
pathThe partial label sequence.
beginThe start position of the partial label sequence.
endThe last+1 position of the partial label sequence.
ptr_probThe pointer to a float variable that receives the marginal probability.
Returns:
int The status code.
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).

Parameters:
taggerThe pointer to this tagger instance.
lThe label.
tThe position.
ptr_probThe pointer to a float variable that receives the marginal probability.
Returns:
int The status code.

Decrement the reference counter.

Parameters:
taggerThe pointer to this tagger instance.
Returns:
int The reference count after this operation.
int(* tag_crfsuite_tagger::score)(crfsuite_tagger_t *tagger, int *path, floatval_t *ptr_score)

Compute the score of a label sequence.

Parameters:
taggerThe pointer to this tagger instance.
pathThe label sequence.
ptr_scoreThe pointer to a float variable that receives the score of the label sequence.
Returns:
int The status code.

Set an instance to the tagger.

Parameters:
taggerThe pointer to this tagger instance.
instThe item sequence to be tagged.
Returns:
int The status code.
int(* tag_crfsuite_tagger::viterbi)(crfsuite_tagger_t *tagger, int *labels, floatval_t *ptr_score)

Find the Viterbi label sequence.

Parameters:
taggerThe pointer to this tagger instance.
labelsThe 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_scoreThe pointer to a float variable that receives the score of the Viterbi label sequence.
Returns:
int The status code.

Copyright (c) 2002-2011 by Naoaki Okazaki
Thu Aug 11 2011 12:37:06