Classes | Typedefs | Functions
Object interfaces and utilities.
CRFSuite C API

Classes

struct  tag_crfsuite_model
 CRFSuite model interface. More...
struct  tag_crfsuite_trainer
 CRFSuite trainer interface. More...
struct  tag_crfsuite_tagger
 CRFSuite tagger interface. More...
struct  tag_crfsuite_dictionary
 CRFSuite dictionary interface. More...
struct  tag_crfsuite_params
 CRFSuite parameter interface. More...

Typedefs

typedef struct tag_crfsuite_model crfsuite_model_t
 CRFSuite model interface.
typedef struct tag_crfsuite_trainer crfsuite_trainer_t
 CRFSuite trainer interface.
typedef struct tag_crfsuite_tagger crfsuite_tagger_t
 CRFSuite tagger interface.
typedef struct
tag_crfsuite_dictionary 
crfsuite_dictionary_t
 CRFSuite dictionary interface.
typedef struct tag_crfsuite_params crfsuite_params_t
 CRFSuite parameter interface.
typedef int(* crfsuite_logging_callback )(void *user, const char *format, va_list args)
 Type of callback function for logging.

Functions

int crfsuite_create_instance (const char *iid, void **ptr)
 Create an instance of an object by an interface identifier.
int crfsuite_create_instance_from_file (const char *filename, void **ptr)
 Create an instance of a model object from a model file.
int crfsuite_create_tagger (const char *filename, crfsuite_tagger_t **ptr_tagger, crfsuite_dictionary_t **ptr_attrs, crfsuite_dictionary_t **ptr_labels)
 Create instances of tagging object from a model file.

Typedef Documentation

CRFSuite dictionary interface.

typedef int(* crfsuite_logging_callback)(void *user, const char *format, va_list args)

Type of callback function for logging.

Parameters:
userPointer to the user-defined data.
formatFormat string (compatible with prinf()).
argsOptional arguments for the format string.
Returns:
int 0 to continue; non-zero to cancel the training.

CRFSuite model interface.

CRFSuite parameter interface.

CRFSuite tagger interface.

CRFSuite trainer interface.


Function Documentation

int crfsuite_create_instance ( const char *  iid,
void **  ptr 
)

Create an instance of an object by an interface identifier.

Parameters:
iidThe interface identifier.
ptrThe pointer to void* that points to the instance of the object if successful, *ptr points to NULL otherwise.
Returns:
int 0 if this function creates an object successfully, 1 otherwise.
int crfsuite_create_instance_from_file ( const char *  filename,
void **  ptr 
)

Create an instance of a model object from a model file.

Parameters:
filenameThe filename of the model.
ptrThe pointer to void* that points to the instance of the model object if successful, *ptr points to NULL otherwise.
Returns:
int 0 if this function creates an object successfully, 1 otherwise.
int crfsuite_create_tagger ( const char *  filename,
crfsuite_tagger_t **  ptr_tagger,
crfsuite_dictionary_t **  ptr_attrs,
crfsuite_dictionary_t **  ptr_labels 
)

Create instances of tagging object from a model file.

Parameters:
filenameThe filename of the model.
ptr_taggerThe pointer to void* that points to the instance of the tagger object if successful, *ptr points to NULL otherwise.
ptr_attrsThe pointer to void* that points to the instance of the dictionary object for attributes if successful, *ptr points to NULL otherwise.
ptr_labelsThe pointer to void* that points to the instance of the dictionary object for labels if successful, *ptr points to NULL otherwise.
Returns:
int 0 if this function creates an object successfully, 1 otherwise.

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