CRFSuite dictionary interface. More...
Public Attributes | |
| void * | internal |
| Pointer to the internal data (internal use only). | |
| int | nref |
| Reference counter (internal use only). | |
| int(* | addref )(crfsuite_dictionary_t *dic) |
| Increment the reference counter. | |
| int(* | release )(crfsuite_dictionary_t *dic) |
| Decrement the reference counter. | |
| int(* | get )(crfsuite_dictionary_t *dic, const char *str) |
| Assign and obtain the integer ID for the string. | |
| int(* | to_id )(crfsuite_dictionary_t *dic, const char *str) |
| Obtain the integer ID for the string. | |
| int(* | to_string )(crfsuite_dictionary_t *dic, int id, char const **pstr) |
| Obtain the string for the ID. | |
| int(* | num )(crfsuite_dictionary_t *dic) |
| Obtain the number of strings in the dictionary. | |
| void(* | free )(crfsuite_dictionary_t *dic, const char *str) |
| Free the memory block allocated by to_string() function. | |
CRFSuite dictionary interface.
| int(* tag_crfsuite_dictionary::addref)(crfsuite_dictionary_t *dic) |
Increment the reference counter.
| dic | The pointer to this dictionary instance. |
| void(* tag_crfsuite_dictionary::free)(crfsuite_dictionary_t *dic, const char *str) |
Free the memory block allocated by to_string() function.
| dic | The pointer to this dictionary instance. |
| str | The pointer to the string whose memory block is freed. |
| int(* tag_crfsuite_dictionary::get)(crfsuite_dictionary_t *dic, const char *str) |
Assign and obtain the integer ID for the string.
| dic | The pointer to this dictionary instance. |
| str | The string. |
| int(* tag_crfsuite_dictionary::num)(crfsuite_dictionary_t *dic) |
Obtain the number of strings in the dictionary.
| dic | The pointer to this dictionary instance. |
| int(* tag_crfsuite_dictionary::release)(crfsuite_dictionary_t *dic) |
Decrement the reference counter.
| dic | The pointer to this dictionary instance. |
| int(* tag_crfsuite_dictionary::to_id)(crfsuite_dictionary_t *dic, const char *str) |
Obtain the integer ID for the string.
| dic | The pointer to this dictionary instance. |
| str | The string. |
-1 otherwise. | int(* tag_crfsuite_dictionary::to_string)(crfsuite_dictionary_t *dic, int id, char const **pstr) |
Obtain the string for the ID.
| dic | The pointer to this dictionary instance. |
| id | the string ID. |
| pstr | *pstr points to the string associated with the ID if any, NULL otherwise. |
0 if the string ID is associated with a string, 1 otherwise.