Filler penalties, penalties for words that do not show up in the main LM. More...
#include <logmath.h>
#include <s3types.h>
#include "dict.h"
Go to the source code of this file.
Classes | |
struct | fillpen_t |
Functions | |
S3DECODER_EXPORT fillpen_t * | fillpen_init (dict_t *dict, const char *file, float64 silprob, float64 fillprob, float64 lw, float64 wip, logmath_t *logmath) |
int32 | fillpen (fillpen_t *f, s3wid_t w) |
void | fillpen_report (fillpen_t *f) |
S3DECODER_EXPORT void | fillpen_free (fillpen_t *f) |
Filler penalties, penalties for words that do not show up in the main LM.
Return the filler word probability for the given dictionary word-ID.
f | In: Filler word probabilities structure | |
w | In: Dictionary word-ID of filler word |
Referenced by word_trans().
S3DECODER_EXPORT void fillpen_free | ( | fillpen_t * | f | ) |
f | A filler penalty structure |
S3DECODER_EXPORT fillpen_t* fillpen_init | ( | dict_t * | dict, | |
const char * | file, | |||
float64 | silprob, | |||
float64 | fillprob, | |||
float64 | lw, | |||
float64 | wip, | |||
logmath_t * | logmath | |||
) |
Initialize filler probabilities (penalties, whatever) module and return a pointer to the structure created. Filler word probabilities are simple unigram probabilities. Here is an example of such a file (one entry per line; a word and a probability): <sil> 0.10792 <uh> 0.00866 <um> 0.00147 If the first character in a line is a '#', the line is treated as a comment and ignored. If no filler probabilities file is provided, the silence word gets silprob, and all other filler words get fillprob. As with the trigram LM, the resulting log-probabilities are multiplied by a language weight and finally a word insertion penalty is tacked on.