# /home/taku/.proj/crfpp/crfpp.h File Reference

`#include <cstdio>`

Go to the source code of this file.

## Classes

class | CRFPP::Model
class | CRFPP::Tagger

## Namespaces

namespace | CRFPP

## Typedefs

typedef struct crfpp_t | crfpp_t
typedef struct crfpp_model_t | crfpp_model_t

## Functions

CRFPP_DLL_EXTERN crfpp_model_t * | crfpp_model_new (int, char **)
CRFPP_DLL_EXTERN crfpp_model_t * | crfpp_model_new2 (const char *)
CRFPP_DLL_EXTERN const char * | crfpp_model_strerror (crfpp_model_t *)
CRFPP_DLL_EXTERN crfpp_t * | crfpp_model_new_tagger (crfpp_model_t *)
CRFPP_DLL_EXTERN crfpp_t * | crfpp_new (int, char **)
CRFPP_DLL_EXTERN crfpp_t * | crfpp_new2 (const char *)
CRFPP_DLL_EXTERN void | crfpp_destroy (crfpp_t *)
CRFPP_DLL_EXTERN bool | crfpp_add2 (crfpp_t *, size_t, const char **)
CRFPP_DLL_EXTERN bool | crfpp_add (crfpp_t *, const char *)
CRFPP_DLL_EXTERN size_t | crfpp_size (crfpp_t *)
CRFPP_DLL_EXTERN size_t | crfpp_xsize (crfpp_t *)
CRFPP_DLL_EXTERN size_t | crfpp_dsize (crfpp_t *)
CRFPP_DLL_EXTERN const float * | crfpp_weight_vector (crfpp_t *)
CRFPP_DLL_EXTERN size_t | crfpp_result (crfpp_t *, size_t)
CRFPP_DLL_EXTERN size_t | crfpp_answer (crfpp_t *, size_t)
CRFPP_DLL_EXTERN size_t | crfpp_y (crfpp_t *, size_t)
CRFPP_DLL_EXTERN size_t | crfpp_ysize (crfpp_t *)
CRFPP_DLL_EXTERN double | crfpp_prob (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_prob2 (crfpp_t *, size_t)
CRFPP_DLL_EXTERN double | crfpp_prob3 (crfpp_t *)
CRFPP_DLL_EXTERN void | crfpp_set_penalty (crfpp_t *, size_t i, size_t j, double penalty)
CRFPP_DLL_EXTERN double | crfpp_penalty (crfpp_t *, size_t i, size_t j)
CRFPP_DLL_EXTERN double | crfpp_alpha (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_beta (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_emisstion_cost (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_next_transition_cost (crfpp_t *, size_t, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_prev_transition_cost (crfpp_t *, size_t, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_best_cost (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN const int * | crfpp_emittion_vector (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN const int * | crfpp_next_transition_vector (crfpp_t *, size_t, size_t, size_t)
CRFPP_DLL_EXTERN const int * | crfpp_prev_transition_vector (crfpp_t *, size_t, size_t, size_t)
CRFPP_DLL_EXTERN double | crfpp_Z (crfpp_t *)
CRFPP_DLL_EXTERN bool | crfpp_parse (crfpp_t *)
CRFPP_DLL_EXTERN bool | crfpp_empty (crfpp_t *)
CRFPP_DLL_EXTERN bool | crfpp_clear (crfpp_t *)
CRFPP_DLL_EXTERN bool | crfpp_next (crfpp_t *)
CRFPP_DLL_EXTERN int | crfpp_test (int, char **)
CRFPP_DLL_EXTERN int | crfpp_learn (int, char **)
CRFPP_DLL_EXTERN const char * | crfpp_strerror (crfpp_t *)
CRFPP_DLL_EXTERN const char * | crfpp_yname (crfpp_t *, size_t)
CRFPP_DLL_EXTERN const char * | crfpp_y2 (crfpp_t *, size_t)
CRFPP_DLL_EXTERN const char * | crfpp_x (crfpp_t *, size_t, size_t)
CRFPP_DLL_EXTERN const char ** | crfpp_x2 (crfpp_t *, size_t)
CRFPP_DLL_EXTERN const char * | crfpp_parse_tostr (crfpp_t *, const char *)
CRFPP_DLL_EXTERN const char * | crfpp_parse_tostr2 (crfpp_t *, const char *, size_t)
CRFPP_DLL_EXTERN const char * | crfpp_parse_tostr3 (crfpp_t *, const char *, size_t, char *, size_t)
CRFPP_DLL_EXTERN const char * | crfpp_tostr (crfpp_t *)
CRFPP_DLL_EXTERN const char * | crfpp_tostr2 (crfpp_t *, char *, size_t)
CRFPP_DLL_EXTERN void | crfpp_set_vlevel (crfpp_t *, unsigned int)
CRFPP_DLL_EXTERN unsigned int | crfpp_vlevel (crfpp_t *)
CRFPP_DLL_EXTERN void | crfpp_set_cost_factor (crfpp_t *, float)
CRFPP_DLL_EXTERN float | crfpp_cost_factor (crfpp_t *)
CRFPP_DLL_EXTERN void | crfpp_set_nbest (crfpp_t *, size_t)
CRFPP_DLL_EXTERN Tagger * | CRFPP::createTagger (int argc, char **argv)
CRFPP_DLL_EXTERN Tagger * | CRFPP::createTagger (const char *arg)
CRFPP_DLL_EXTERN Model * | CRFPP::createModel (int argc, char **argv)
CRFPP_DLL_EXTERN Model * | CRFPP::createModel (const char *arg)
CRFPP_DLL_EXTERN const char * | CRFPP::getTaggerError ()
CRFPP_DLL_EXTERN const char * | CRFPP::getLastError ()

## Typedef Documentation

typedef struct crfpp_model_t crfpp_model_t

typedef struct crfpp_t crfpp_t

## Function Documentation

CRFPP_DLL_EXTERN bool crfpp_add | ( | crfpp_t * | ,
|  | const char * |  |
| ) |  |  |

CRFPP_DLL_EXTERN bool crfpp_add2 | ( | crfpp_t * | ,
|  | size_t | ,
|  | const char ** |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_alpha | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN size_t crfpp_answer | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_best_cost | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_beta | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN bool crfpp_clear | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN float crfpp_cost_factor | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN void crfpp_destroy | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN size_t crfpp_dsize | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN double crfpp_emisstion_cost | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const int* crfpp_emittion_vector | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN bool crfpp_empty | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN int crfpp_learn | ( | int | ,
|  | char ** |  |
| ) |  |  |

CRFPP_DLL_EXTERN crfpp_model_t* crfpp_model_new | ( | int | ,
|  | char ** |  |
| ) |  |  |

CRFPP_DLL_EXTERN crfpp_model_t* crfpp_model_new2 | ( | const char * |  | ) |

CRFPP_DLL_EXTERN crfpp_t* crfpp_model_new_tagger | ( | crfpp_model_t * |  | ) |

CRFPP_DLL_EXTERN const char* crfpp_model_strerror | ( | crfpp_model_t * |  | ) |

CRFPP_DLL_EXTERN crfpp_t* crfpp_new | ( | int | ,
|  | char ** |  |
| ) |  |  |

CRFPP_DLL_EXTERN crfpp_t* crfpp_new2 | ( | const char * |  | ) |

CRFPP_DLL_EXTERN bool crfpp_next | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN double crfpp_next_transition_cost | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const int* crfpp_next_transition_vector | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN bool crfpp_parse | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN const char* crfpp_parse_tostr | ( | crfpp_t * | ,
|  | const char * |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char* crfpp_parse_tostr2 | ( | crfpp_t * | ,
|  | const char * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char* crfpp_parse_tostr3 | ( | crfpp_t * | ,
|  | const char * | ,
|  | size_t | ,
|  | char * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_penalty | ( | crfpp_t * | ,
|  | size_t | i,
|  | size_t | j |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_prev_transition_cost | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const int* crfpp_prev_transition_vector | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_prob | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_prob2 | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN double crfpp_prob3 | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN size_t crfpp_result | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN void crfpp_set_cost_factor | ( | crfpp_t * | ,
|  | float |  |
| ) |  |  |

CRFPP_DLL_EXTERN void crfpp_set_nbest | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN void crfpp_set_penalty | ( | crfpp_t * | ,
|  | size_t | i,
|  | size_t | j,
|  | double | penalty |
| ) |  |  |

CRFPP_DLL_EXTERN void crfpp_set_vlevel | ( | crfpp_t * | ,
|  | unsigned | int |
| ) |  |  |

CRFPP_DLL_EXTERN size_t crfpp_size | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN const char* crfpp_strerror | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN int crfpp_test | ( | int | ,
|  | char ** |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char* crfpp_tostr | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN const char* crfpp_tostr2 | ( | crfpp_t * | ,
|  | char * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN unsigned int crfpp_vlevel | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN const float* crfpp_weight_vector | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN const char* crfpp_x | ( | crfpp_t * | ,
|  | size_t | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char** crfpp_x2 | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN size_t crfpp_xsize | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN size_t crfpp_y | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char* crfpp_y2 | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN const char* crfpp_yname | ( | crfpp_t * | ,
|  | size_t |  |
| ) |  |  |

CRFPP_DLL_EXTERN size_t crfpp_ysize | ( | crfpp_t * |  | ) |

CRFPP_DLL_EXTERN double crfpp_Z | ( | crfpp_t * |  | ) |