CRFSuite parameter interface. More...
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. | |
CRFSuite parameter interface.
| int(* tag_crfsuite_params::addref)(crfsuite_params_t *params) |
Increment the reference counter.
| params | The pointer to this parameter instance. |
| void(* tag_crfsuite_params::free)(crfsuite_params_t *params, const char *str) |
Free the memory block of a string allocated by this object.
| params | The pointer to this parameter instance. |
| str | The pointer to the string. |
| int(* tag_crfsuite_params::get)(crfsuite_params_t *params, const char *name, char **ptr_value) |
Get a parameter value.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| ptr_value | *ptr_value presents the parameter value in string format. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| ptr_value | The pointer to a variable that receives the float value. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| ptr_value | The pointer to a variable that receives the integer value. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| ptr_value | *ptr_value presents the parameter value. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| ptr_type | The pointer to char* to which this function store the type of the parameter. |
| ptr_help | The pointer to char* to which this function store the help message of the parameter. |
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.
| params | The pointer to this parameter instance. |
| i | The parameter index. |
| ptr_name | *ptr_name points to the parameter name. |
0 always. | int(* tag_crfsuite_params::num)(crfsuite_params_t *params) |
Obtain the number of available parameters.
| params | The pointer to this parameter instance. |
| int(* tag_crfsuite_params::release)(crfsuite_params_t *params) |
Decrement the reference counter.
| params | The pointer to this parameter instance. |
| int(* tag_crfsuite_params::set)(crfsuite_params_t *params, const char *name, const char *value) |
Set a parameter value.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| value | The parameter value in string format. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| value | The parameter value. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| value | The parameter value. |
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.
| params | The pointer to this parameter instance. |
| name | The parameter name. |
| value | The parameter value. |
0 if the parameter value is set successfully, -1 otherwise (unknown parameter or incompatible type).