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

Define the LM-interface. More...

Data Structures

struct  SprCwrLMStrRead
 
struct  SprCwrLMWordHdr
 
struct  SprCwrLMInstance_
 
struct  SprCwrLMInterface
 

Typedefs

typedef float(* _FuncPtr1_CWR_LM_INTERFACE_ )(const SprCwrLMInstance *lm, const SprLMContext *lmc, int wndx)
 
typedef float(* _FuncPtr2_CWR_LM_INTERFACE_ )(SprCwrLMInstance *lm, const SprLMContext *lmc, SprLMContext *lmc_next, SprCwrLMWord *wrd)
 
typedef SprCwrLMWord *(* _FuncPtr3_CWR_LM_INTERFACE_ )(const SprCwrLMInstance *lm, const SprLMContext *lmc, SprCwrLMWord *wrd)
 
typedef float *(* _FuncPtr4_CWR_LM_INTERFACE_ )(const SprCwrLMInstance *lm, const SprLMContext *lmc, float *all_probs, SprCwrLMWord *wrd)
 
typedef int(* _FuncPtr5_CWR_LM_INTERFACE_ )(SprCwrLMInstance *lm, unsigned int action,...)
 query the LM More...
 

Enumerations

enum  {
  SPR_CWR_LMI_LOADED, SPR_CWR_LMI_NOT_ACTIVE, SPR_CWR_LMI_MULTI_CLASS, SPR_CWR_LMI_TRIV_LM,
  SPR_CWR_LMI_INF_WVIEW, SPR_CWR_LMI_WORST_CASE_INV
}
 the bit-flags 'flags' in the LMInterface structure More...
 
enum  {
  SPR_CWR_LMI_PCALC_DOC, SPR_CWR_LMI_PRINT_LMC, SPR_CWR_LMI_GET_CONTEXT_DEPTH, SPR_CWR_LMI_GET_SLMSP,
  SPR_CWR_LMI_KNOWN_WORD, SPR_CWR_LMI_SET_LM_FAC, SPR_CWR_LMI_GET_LM_FAC, SPR_CWR_LMI_CHECK,
  SPR_CWR_LMI_GET_OPT_DESC, SPR_CWR_LMI_UNINSTALL
}
 

Variables

const SprCwrLMStrRead spr_cwr_empty_lm_str_read
 
const SprCwrLMInterface spr_cwr_empty_lm_interface
 

Detailed Description

Define the LM-interface.

Specifies the interface for the LM.

LMContext
A vector of polymorphic elements. Each element may contain an integer, a float or a pointer. The first extra element in front of the array (index [0]) returns the length of the discriminative part of the context. Although this elements is used to return the length, it should not be read from after the return as the calling process may have changed its value! In it current implementation, one should limit the content of the discriminative context to integers (and a well defined float) – pointers should not be used!
LMWord

A structure that contains both input data, return data and scratch data.

word_ndx
INPUT: specifies the word, using the numbering scheme used by the caller – the LM may use a different internal numbering scheme
first_last
INPUT: zero at the first call to the xxx_lmcn() function, non-zero (note: the non-zero value is set as OUTPUT by the xxx_lmcn() function) for all subsequent calls. OUTPUT: non-zero if more sub-classes are pending (and thus zero when the last sub-class is handled).
class_id
OUTPUT: class id returned by xxx_lmcn(); uniquely identifies the sub-class given the LM-context and word index. The class_id must be set, even in non multi-class LM's! INPUT: when first_last is not 0, the previous value of class_id must be present.
ext_info
INPUT: info from the recognizer passed on to the LM (reserved for future use).
Date
July 2002
Author
Kris Demuynck
Revision History:
12/2004 - KD
Small redesigns in the LM-interface.