libsent/src/phmm/gprune_safe.c File Reference

Calculate probability of a set of Gaussian densities by Gaussian pruning: safe algorithm. More...

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm.h>
#include <sent/gprune.h>
#include "globalvars.h"

Include dependency graph for gprune_safe.c:

Go to the source code of this file.

Functions

LOGPROB compute_g_safe (HTK_HMM_Dens *binfo, LOGPROB thres)
 Calculate probability with safe pruning.
boolean gprune_safe_init ()
void gprune_safe_free ()
void gprune_safe (HTK_HMM_Dens **g, int gnum, int *last_id)
 Compute a set of Gaussians with safe pruning.

Variables

static booleanmixcalced
 Mark which Gaussian has been computed.


Detailed Description

Calculate probability of a set of Gaussian densities by Gaussian pruning: safe algorithm.

Author:
Akinobu LEE
Date:
Thu Feb 17 05:28:12 2005
gprune_safe() is one of the functions to compute output probability of a set of Gaussian densities. This function does safe pruning, trying to compute only the best ones for faster computation. If a tied-mixture HMM model with GPRUNE_DEFAULT_SAFE defined in Julius, or explicitly specified by "-gprune safe" option, this function will be used.

The safe pruning is the most safe method that can find the exact N-best Gaussians, but the efficiency is smaller.

gprune_safe() will be used by calling outprob_init() to set its pointer to the global variable compute_gaussset. Then it will be called from calc_tied_mix() or calc_mix().

Revision
1.6

Definition in file gprune_safe.c.


Function Documentation

LOGPROB compute_g_safe ( HTK_HMM_Dens binfo,
LOGPROB  thres 
)

Calculate probability with safe pruning.

Calculate probability of a Gaussian toward OP_vec, performing pruning using the scholar threshold.

Parameters:
binfo [in] Gaussian density
thres [in] threshold
Returns:
the output log probability.

Definition at line 77 of file gprune_safe.c.

Referenced by gprune_beam(), gprune_heu(), and gprune_safe().

boolean gprune_safe_init (  ) 

Initialize and setup work area for Gaussian pruning by safe algorithm.

Returns:
TRUE on success, FALSE on failure.

Definition at line 106 of file gprune_safe.c.

Referenced by outprob_init().

void gprune_safe_free (  ) 

Free gprune_safe related work area.

Definition at line 123 of file gprune_safe.c.

Referenced by outprob_init().

void gprune_safe ( HTK_HMM_Dens **  g,
int  gnum,
int *  last_id 
)

Compute a set of Gaussians with safe pruning.

If the N-best mixtures in the previous frame is specified in last_id, They are first computed to set the initial threshold. After that, the rest of the Gaussians will be computed with the thresholds to drop unpromising Gaussians from computation at early stage of likelihood computation. If the computation of a Gaussian reached to the end, the threshold will be updated to always hold the likelihood of current N-best score.

The calculated scores will be stored to OP_calced_score, with its corresponding mixture id to OP_calced_id. These are done by calling cache_push(). The number of calculated mixtures is also stored in OP_calced_num.

This can be called from calc_tied_mix() or calc_mix().

Parameters:
g [in] set of Gaussian densities to compute the output probability
gnum [in] length of above
last_id [in] ID list of N-best mixture in previous input frame, or NULL if not exist

Definition at line 154 of file gprune_safe.c.

Referenced by outprob_init().


Generated on Tue Dec 26 12:55:03 2006 for Julian by  doxygen 1.5.0