SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Functions | Variables
cwr_lm_std.c File Reference

The standard N-gram LM. More...

Data Structures

struct  SprCwrLMStd32SQ
 
struct  SprCwrLMStd
 

Functions

SprCwrLMStdspr_cwr_lm_std_free (SprCwrLMStd *lm)
 Free all data corresponding to the LM. Return NULL. More...
 
int spr_cwr_lm_std_uninstall (SprCwrLMInterface *lmi, SprCwrLMInstance *lm_data)
 
int spr_cwr_lm_std_install (SprCwrLMInterface *lmi, SprCwrLMInstance *lm_data, unsigned int sz_lm_data, const SprCwrLMStd *lm, const SprCwrSLex *lex)
 
SprCwrLMStdspr_cwr_lm_std_read (SprCwrLMStd *dst, const char *fname, const char *options)
 

Variables

const SprCmdOptDesc spr_cwr_od_read_lm []
 
int spr_cwr_pall_zero
 just something to confuse the compiler More...
 
const SprCwrSRMDesc spr_cwr_srm_desc_lm_std
 

Detailed Description

The standard N-gram LM.

A fast and (very) memory efficient implementation of a standard N-gram. A set of common extensions can be used to extend the basic N-gram (see cwr_lm_ext.c).

[Load-flags]
FWD<I32:val>(1)
Method used to calculate the forwarded probabilities:
(0) no prob. forwarding,
(1) the unigram probabilities,
(2) a weighted sum of the N-gram probabilities over all seen events,
(3) sqrt(fwd_1*fwd_2),
(4) (fwd_1+fwd)/2.
check_lvl=<I8:val>(0)
Do some checking to see if there are errors in the LM, the level controls the output: (0) no checking, (1) give error count, (2) give detailed error info, (3) do not allow non zero back-off costs on empty LM-contexts, (4) report the first empty LM-context with a non zero back-off cost, (5) do not allow non-zero LM-contexts, (6) report the first non-zero LM-context.
CLOSED(NULL)
Do not allow a closed vocabulary LM to be used in an open vocabulary setup.
CSR(NULL)
Do not treat </s> as a blocking end-of-sentence symbol.
ELMC0(NULL)
Force the back-off cost of empty LM-contexts to zero.
ext=<String:val>(NULL)
A file containing word extension on the base lexicon.
wdsf=<String:val>(NULL)
A file containing word dependent LM scale factors.
Date
July 2002
Author
Kris Demuynck
Bug:

The LM is not normalized when using 'extensions'. This has no tangible effect on the recognition, but perplexities calculated with the given LM will be incorrect.

If the FULL_DEBUG flag is set during compilation (-DFULL_DEBUG), some extra debug mesages and tests are added. These tests result in a serious overhead.

Revision History:
10/2003 - KD
Added the LM-extensions
12/2004 - KD
Isolated the LM-extensions so that they can be pushed on top of other LM's as well