libak
0.4.0
|
Data Structures | |
struct | akCharInitializer |
Character model initializer. More... | |
Defines | |
#define | ak_char_initializer_free(INIT) (INIT)->meths->free ( INIT ) |
Frees memory. | |
#define | ak_init_char(INIT, COUNTS, C, FEA) ak_init_char_seg ( INIT, COUNTS, C, FEA, 0, (FEA)->cols ) |
Initializes a character model by linear segmentation of sample. | |
Functions | |
akCharInitializer * | ak_char_initializer_new (const akCModel *cmodel, char **err) |
Gets a character model initializer. | |
void | ak_init_char_seg (akCharInitializer *init, akCMiCounts *counts, const int c, const akFea *fea, const int begin, const int nframes) |
Initializes a character model by linear segmentation of a segment of sample. |
#define ak_char_initializer_free | ( | INIT | ) | (INIT)->meths->free ( INIT ) |
Frees memory.
Frees the memory allocated for character model initializer.
INIT | The character model initializer. |
#define ak_init_char | ( | INIT, | |
COUNTS, | |||
C, | |||
FEA | |||
) | ak_init_char_seg ( INIT, COUNTS, C, FEA, 0, (FEA)->cols ) |
Initializes a character model by linear segmentation of sample.
This macro is equivalent to ak_init_char_seg but using all frames contained in fea.
INIT | The character cmodel initializer. |
COUNTS | Integer counts related to CMODEL used by INIT. |
C | The index of the character to be initialized. |
FEA | A feature vectors manager, which must contain a sequence of feature vectors of an adequate type for the CMODEL. |
akCharInitializer* ak_char_initializer_new | ( | const akCModel * | cmodel, |
char ** | err | ||
) |
Gets a character model initializer.
This function creates a new character model initializer used to initialize character models by linear segmentation. Currently supported types are: Bernoulli and DGaussian.
cmodel | The character models. |
err | Pointer to string variable. If not NULL an error message is allocated in the variable in case of error. |
void ak_init_char_seg | ( | akCharInitializer * | init, |
akCMiCounts * | counts, | ||
const int | c, | ||
const akFea * | fea, | ||
const int | begin, | ||
const int | nframes | ||
) |
Initializes a character model by linear segmentation of a segment of sample.
This function linearly segments the input frames, which are a segment of the given feature vector sequence, according to the number of states of the specified character model. According to this segmentation, input frames are assigned to states, and then, states counts are consequently increased.
init | Character model initializer. |
counts | Integer counts related to cmodel used by the character model initializer. |
c | The index of the character to be initialized. |
fea | A feature vectors manager, which must contain a sequence of feature vectors of an adequate type for the cmodel. |
begin | The first input frame. |
nframes | The number of input frames. |