src/libpocketsphinx/fillpen.h File Reference

Filler penalties, penalties for words that do not show up in the main LM. More...

#include <logmath.h>
#include "s3types.h"
#include "s3dict.h"

Go to the source code of this file.

Data Structures

struct  fillpen_t

Functions

fillpen_tfillpen_init (s3dict_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.
int32 fillpen (fillpen_t *f, s3wid_t w)
 Return the filler word probability for the given dictionary word-ID.
void fillpen_report (fillpen_t *f)
 Report the fillpen_t structure.
void fillpen_free (fillpen_t *f)

Detailed Description

Filler penalties, penalties for words that do not show up in the main LM.

Definition in file fillpen.h.


Function Documentation

int32 fillpen ( fillpen_t f,
s3wid_t  w 
)

Return the filler word probability for the given dictionary word-ID.

Parameters:
f In: Filler word probabilities structure
w In: Dictionary word-ID of filler word

Definition at line 168 of file fillpen.c.

References s3dict_t::filler_start, and fillpen_t::prob.

void fillpen_free ( fillpen_t f  ) 
Parameters:
f A filler penalty structure

Definition at line 177 of file fillpen.c.

References fillpen_t::prob.

fillpen_t* fillpen_init ( s3dict_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.

Parameters:
dict In: Dictionary containing filler words
file In: Filler word probabilities file, if any
silprob In: Default probability for silence word
fillprob In: Default probability for non-silence filler words
lw In: Language weight (see lm.h)
wip In: Word insertion penalty (see lm.h)

Definition at line 80 of file fillpen.c.

References s3dict_t::filler_end, s3dict_t::filler_start, fillpen_t::fillerprob, fillpen_t::lw, fillpen_t::prob, fillpen_t::silprob, and fillpen_t::wip.

void fillpen_report ( fillpen_t f  ) 

Report the fillpen_t structure.

Parameters:
f In: Filler word probabilities structure

Definition at line 156 of file fillpen.c.

References fillpen_t::fillerprob, fillpen_t::lw, fillpen_t::silprob, and fillpen_t::wip.


Generated on 16 Jul 2011 for PocketSphinx by  doxygen 1.6.1