Zinnia: /home/taku/.trunk/zinnia/zinnia.h File Reference

# /home/taku/.trunk/zinnia/zinnia.h File Reference

`#include <cstdio>`

Go to the source code of this file.

## Namespaces
namespace | zinnia
## Classes
class | zinnia::Character
class | zinnia::Result
class | zinnia::Recognizer
class | zinnia::Trainer
## Typedefs
typedef struct zinnia_character_t | zinnia_character_t
typedef struct zinnia_recognizer_t | zinnia_recognizer_t
typedef struct zinnia_result_t | zinnia_result_t
typedef struct zinnia_trainer_t | zinnia_trainer_t
## Functions
ZINNIA_DLL_EXTERN int | zinnia_do (int argc, char **argv)
ZINNIA_DLL_EXTERN int | zinnia_learn (int argc, char **argv)
ZINNIA_DLL_EXTERN int | zinnia_convert (int argc, char **argv)
ZINNIA_DLL_EXTERN const char * | zinnia_version ()
ZINNIA_DLL_EXTERN zinnia_character_t * | zinnia_character_new ()
ZINNIA_DLL_EXTERN void | zinnia_character_destroy (zinnia_character_t *character)
ZINNIA_DLL_EXTERN void | zinnia_character_set_value (zinnia_character_t *character, const char *str)
ZINNIA_DLL_EXTERN void | zinnia_character_set_value2 (zinnia_character_t *character, const char *str, size_t length)
ZINNIA_DLL_EXTERN const char * | zinnia_character_value (zinnia_character_t *character)
ZINNIA_DLL_EXTERN void | zinnia_character_set_width (zinnia_character_t *character, size_t width)
ZINNIA_DLL_EXTERN void | zinnia_character_set_height (zinnia_character_t *character, size_t height)
ZINNIA_DLL_EXTERN size_t | zinnia_character_width (zinnia_character_t *character)
ZINNIA_DLL_EXTERN size_t | zinnia_character_height (zinnia_character_t *character)
ZINNIA_DLL_EXTERN void | zinnia_character_clear (zinnia_character_t *stroke)
ZINNIA_DLL_EXTERN int | zinnia_character_add (zinnia_character_t *character, size_t id, int x, int y)
ZINNIA_DLL_EXTERN size_t | zinnia_character_strokes_size (zinnia_character_t *character)
ZINNIA_DLL_EXTERN size_t | zinnia_character_stroke_size (zinnia_character_t *character, size_t id)
ZINNIA_DLL_EXTERN int | zinnia_character_x (zinnia_character_t *character, size_t id, size_t i)
ZINNIA_DLL_EXTERN int | zinnia_character_y (zinnia_character_t *character, size_t id, size_t i)
ZINNIA_DLL_EXTERN int | zinnia_character_parse (zinnia_character_t *character, const char *str)
ZINNIA_DLL_EXTERN int | zinnia_character_parse2 (zinnia_character_t *character, const char *str, size_t length)
ZINNIA_DLL_EXTERN int | zinnia_character_to_string (zinnia_character_t *character, char *buf, size_t length)
ZINNIA_DLL_EXTERN const char * | zinnia_character_strerror (zinnia_character_t *character)
ZINNIA_DLL_EXTERN const char * | zinnia_result_value (zinnia_result_t *result, size_t i)
ZINNIA_DLL_EXTERN float | zinnia_result_score (zinnia_result_t *result, size_t i)
ZINNIA_DLL_EXTERN size_t | zinnia_result_size (zinnia_result_t *result)
ZINNIA_DLL_EXTERN void | zinnia_result_destroy (zinnia_result_t *result)
ZINNIA_DLL_EXTERN zinnia_recognizer_t * | zinnia_recognizer_new ()
ZINNIA_DLL_EXTERN void | zinnia_recognizer_destroy (zinnia_recognizer_t *recognizer)
ZINNIA_DLL_EXTERN int | zinnia_recognizer_open (zinnia_recognizer_t *recognizer, const char *filename)
ZINNIA_DLL_EXTERN int | zinnia_recognizer_open_from_ptr (zinnia_recognizer_t *recognizer, const char *ptr, size_t size)
ZINNIA_DLL_EXTERN int | zinnia_recognizer_close (zinnia_recognizer_t *recognizer)
ZINNIA_DLL_EXTERN size_t | zinnia_recognizer_size (zinnia_recognizer_t *recognizer)
ZINNIA_DLL_EXTERN const char * | zinnia_recognizer_value (zinnia_recognizer_t *recognizer, size_t i)
ZINNIA_DLL_EXTERN const char * | zinnia_recognizer_strerror (zinnia_recognizer_t *recognizer)
ZINNIA_DLL_EXTERN zinnia_result_t * | zinnia_recognizer_classify (zinnia_recognizer_t *recognizer, const zinnia_character_t *character, size_t nbest)
ZINNIA_DLL_EXTERN zinnia_trainer_t * | zinnia_trainer_new ()
ZINNIA_DLL_EXTERN void | zinnia_trainer_destroy (zinnia_trainer_t *trainer)
ZINNIA_DLL_EXTERN int | zinnia_trainer_add (zinnia_trainer_t *trainer, const zinnia_character_t *character)
ZINNIA_DLL_EXTERN void | zinnia_trainer_clear (zinnia_trainer_t *trainer)
ZINNIA_DLL_EXTERN int | zinnia_trainer_train (zinnia_trainer_t *trainer, const char *filename)
ZINNIA_DLL_EXTERN const char * | zinnia_trainer_strerror (zinnia_trainer_t *trainer)
ZINNIA_DLL_EXTERN int | zinnia_trainer_convert_model (const char *txt_model, const char *binary_model, double compression_threshold)
ZINNIA_DLL_EXTERN int | zinnia_trainer_make_header (const char *txt_model, const char *header_file, const char *name, double compression_threshold)
ZINNIA_DLL_EXTERN const char * | zinnia::version ()
ZINNIA_DLL_EXTERN Recognizer * | zinnia::createRecognizer ()
ZINNIA_DLL_EXTERN Character * | zinnia::createCharacter ()
ZINNIA_DLL_EXTERN Trainer * | zinnia::createTrainer ()

## Typedef Documentation

typedef struct zinnia_character_t zinnia_character_t

typedef struct zinnia_recognizer_t zinnia_recognizer_t

typedef struct zinnia_result_t zinnia_result_t

typedef struct zinnia_trainer_t zinnia_trainer_t

## Function Documentation

ZINNIA_DLL_EXTERN int zinnia_character_add | ( | zinnia_character_t * | character,
|  | size_t | id,
|  | int | x,
|  | int | y |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_character_clear | ( | zinnia_character_t * | stroke | ) |

ZINNIA_DLL_EXTERN void zinnia_character_destroy | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN size_t zinnia_character_height | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN zinnia_character_t* zinnia_character_new | ( |  | ) |

ZINNIA_DLL_EXTERN int zinnia_character_parse | ( | zinnia_character_t * | character,
|  | const char * | str |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_character_parse2 | ( | zinnia_character_t * | character,
|  | const char * | str,
|  | size_t | length |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_character_set_height | ( | zinnia_character_t * | character,
|  | size_t | height |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_character_set_value | ( | zinnia_character_t * | character,
|  | const char * | str |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_character_set_value2 | ( | zinnia_character_t * | character,
|  | const char * | str,
|  | size_t | length |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_character_set_width | ( | zinnia_character_t * | character,
|  | size_t | width |
| ) |  |  |

ZINNIA_DLL_EXTERN const char* zinnia_character_strerror | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN size_t zinnia_character_stroke_size | ( | zinnia_character_t * | character,
|  | size_t | id |
| ) |  |  |

ZINNIA_DLL_EXTERN size_t zinnia_character_strokes_size | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN int zinnia_character_to_string | ( | zinnia_character_t * | character,
|  | char * | buf,
|  | size_t | length |
| ) |  |  |

ZINNIA_DLL_EXTERN const char* zinnia_character_value | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN size_t zinnia_character_width | ( | zinnia_character_t * | character | ) |

ZINNIA_DLL_EXTERN int zinnia_character_x | ( | zinnia_character_t * | character,
|  | size_t | id,
|  | size_t | i |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_character_y | ( | zinnia_character_t * | character,
|  | size_t | id,
|  | size_t | i |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_convert | ( | int | argc,
|  | char ** | argv |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_do | ( | int | argc,
|  | char ** | argv |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_learn | ( | int | argc,
|  | char ** | argv |
| ) |  |  |

ZINNIA_DLL_EXTERN zinnia_result_t* zinnia_recognizer_classify | ( | zinnia_recognizer_t * | recognizer,
|  | const zinnia_character_t * | character,
|  | size_t | nbest |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_recognizer_close | ( | zinnia_recognizer_t * | recognizer | ) |

ZINNIA_DLL_EXTERN void zinnia_recognizer_destroy | ( | zinnia_recognizer_t * | recognizer | ) |

ZINNIA_DLL_EXTERN zinnia_recognizer_t* zinnia_recognizer_new | ( |  | ) |

ZINNIA_DLL_EXTERN int zinnia_recognizer_open | ( | zinnia_recognizer_t * | recognizer,
|  | const char * | filename |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_recognizer_open_from_ptr | ( | zinnia_recognizer_t * | recognizer,
|  | const char * | ptr,
|  | size_t | size |
| ) |  |  |

ZINNIA_DLL_EXTERN size_t zinnia_recognizer_size | ( | zinnia_recognizer_t * | recognizer | ) |

ZINNIA_DLL_EXTERN const char* zinnia_recognizer_strerror | ( | zinnia_recognizer_t * | recognizer | ) |

ZINNIA_DLL_EXTERN const char* zinnia_recognizer_value | ( | zinnia_recognizer_t * | recognizer,
|  | size_t | i |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_result_destroy | ( | zinnia_result_t * | result | ) |

ZINNIA_DLL_EXTERN float zinnia_result_score | ( | zinnia_result_t * | result,
|  | size_t | i |
| ) |  |  |

ZINNIA_DLL_EXTERN size_t zinnia_result_size | ( | zinnia_result_t * | result | ) |

ZINNIA_DLL_EXTERN const char* zinnia_result_value | ( | zinnia_result_t * | result,
|  | size_t | i |
| ) |  |  |

ZINNIA_DLL_EXTERN int zinnia_trainer_add | ( | zinnia_trainer_t * | trainer,
|  | const zinnia_character_t * | character |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_trainer_clear | ( | zinnia_trainer_t * | trainer | ) |

ZINNIA_DLL_EXTERN int zinnia_trainer_convert_model | ( | const char * | txt_model,
|  | const char * | binary_model,
|  | double | compression_threshold |
| ) |  |  |

ZINNIA_DLL_EXTERN void zinnia_trainer_destroy | ( | zinnia_trainer_t * | trainer | ) |

ZINNIA_DLL_EXTERN int zinnia_trainer_make_header | ( | const char * | txt_model,
|  | const char * | header_file,
|  | const char * | name,
|  | double | compression_threshold |
| ) |  |  |

ZINNIA_DLL_EXTERN zinnia_trainer_t* zinnia_trainer_new | ( |  | ) |

ZINNIA_DLL_EXTERN const char* zinnia_trainer_strerror | ( | zinnia_trainer_t * | trainer | ) |

ZINNIA_DLL_EXTERN int zinnia_trainer_train | ( | zinnia_trainer_t * | trainer,
|  | const char * | filename |
| ) |  |  |

ZINNIA_DLL_EXTERN const char* zinnia_version | ( |  | ) |