Public Attributes
tag_crfsuite_params Struct Reference

CRFSuite parameter interface. More...

List of all members.

Public Attributes

void * internal
 Pointer to the instance data (internal use only).
int nref
 Reference counter (internal use only).
int(* addref )(crfsuite_params_t *params)
 Increment the reference counter.
int(* release )(crfsuite_params_t *params)
 Decrement the reference counter.
int(* num )(crfsuite_params_t *params)
 Obtain the number of available parameters.
int(* name )(crfsuite_params_t *params, int i, char **ptr_name)
 Obtain the name of a parameter.
int(* set )(crfsuite_params_t *params, const char *name, const char *value)
 Set a parameter value.
int(* get )(crfsuite_params_t *params, const char *name, char **ptr_value)
 Get a parameter value.
int(* set_int )(crfsuite_params_t *params, const char *name, int value)
 Set an integer value of a parameter.
int(* set_float )(crfsuite_params_t *params, const char *name, floatval_t value)
 Set a float value of a parameter.
int(* set_string )(crfsuite_params_t *params, const char *name, const char *value)
 Set a string value of a parameter.
int(* get_int )(crfsuite_params_t *params, const char *name, int *ptr_value)
 Get an integer value of a parameter.
int(* get_float )(crfsuite_params_t *params, const char *name, floatval_t *ptr_value)
 Get a float value of a parameter.
int(* get_string )(crfsuite_params_t *params, const char *name, char **ptr_value)
 Get a string value of a parameter.
int(* help )(crfsuite_params_t *params, const char *name, char **ptr_type, char **ptr_help)
 Get the help message of a parameter.
void(* free )(crfsuite_params_t *params, const char *str)
 Free the memory block of a string allocated by this object.

Detailed Description

CRFSuite parameter interface.


Member Data Documentation

Increment the reference counter.

Parameters:
paramsThe pointer to this parameter instance.
Returns:
int The reference count after this increment.
void(* tag_crfsuite_params::free)(crfsuite_params_t *params, const char *str)

Free the memory block of a string allocated by this object.

Parameters:
paramsThe pointer to this parameter instance.
strThe pointer to the string.
int(* tag_crfsuite_params::get)(crfsuite_params_t *params, const char *name, char **ptr_value)

Get a parameter value.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
ptr_value*ptr_value presents the parameter value in string format.
Returns:
int 0 if the parameter is found, -1 otherwise.
int(* tag_crfsuite_params::get_float)(crfsuite_params_t *params, const char *name, floatval_t *ptr_value)

Get a float value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
ptr_valueThe pointer to a variable that receives the float value.
Returns:
int 0 if the parameter value is obtained successfully, -1 otherwise (unknown parameter or incompatible type).
int(* tag_crfsuite_params::get_int)(crfsuite_params_t *params, const char *name, int *ptr_value)

Get an integer value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
ptr_valueThe pointer to a variable that receives the integer value.
Returns:
int 0 if the parameter value is obtained successfully, -1 otherwise (unknown parameter or incompatible type).
int(* tag_crfsuite_params::get_string)(crfsuite_params_t *params, const char *name, char **ptr_value)

Get a string value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
ptr_value*ptr_value presents the parameter value.
Returns:
int 0 if the parameter value is obtained successfully, -1 otherwise (unknown parameter or incompatible type).
int(* tag_crfsuite_params::help)(crfsuite_params_t *params, const char *name, char **ptr_type, char **ptr_help)

Get the help message of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
ptr_typeThe pointer to char* to which this function store the type of the parameter.
ptr_helpThe pointer to char* to which this function store the help message of the parameter.
Returns:
int 0 if the parameter is found, -1 otherwise.
int(* tag_crfsuite_params::name)(crfsuite_params_t *params, int i, char **ptr_name)

Obtain the name of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
iThe parameter index.
ptr_name*ptr_name points to the parameter name.
Returns:
int 0 always.

Obtain the number of available parameters.

Parameters:
paramsThe pointer to this parameter instance.
Returns:
int The number of parameters maintained by this object.

Decrement the reference counter.

Parameters:
paramsThe pointer to this parameter instance.
Returns:
int The reference count after this operation.
int(* tag_crfsuite_params::set)(crfsuite_params_t *params, const char *name, const char *value)

Set a parameter value.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
valueThe parameter value in string format.
Returns:
int 0 if the parameter is found, -1 otherwise.
int(* tag_crfsuite_params::set_float)(crfsuite_params_t *params, const char *name, floatval_t value)

Set a float value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
valueThe parameter value.
Returns:
int 0 if the parameter value is set successfully, -1 otherwise (unknown parameter or incompatible type).
int(* tag_crfsuite_params::set_int)(crfsuite_params_t *params, const char *name, int value)

Set an integer value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
valueThe parameter value.
Returns:
int 0 if the parameter value is set successfully, -1 otherwise (unknown parameter or incompatible type).
int(* tag_crfsuite_params::set_string)(crfsuite_params_t *params, const char *name, const char *value)

Set a string value of a parameter.

Parameters:
paramsThe pointer to this parameter instance.
nameThe parameter name.
valueThe parameter value.
Returns:
int 0 if the parameter value is set successfully, -1 otherwise (unknown parameter or incompatible type).

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