#include "segSpData.h"
#include "segGrammar.h"
Go to the source code of this file.
Data Structures | |
| struct | segSyntaxItem |
| Data structure of nodes for the syntax. More... | |
| struct | segSyntax |
| Data structure of the syntax. More... | |
Defines | |
| #define | EMIT 0 |
| node type 'emitting node' | |
| #define | NONEMIT 1 |
| node type 'first null node in the model' | |
| #define | NONEMIT_F 2 |
| node type 'final null node in the model' | |
| #define | RECOGNITION 0 |
| syntax type: 'recognition' | |
| #define | CLASSIFICATION 1 |
| syntax type: 'classification' | |
| #define | TRAINING 2 |
| syntax type: 'training' | |
Typedefs | |
| typedef segSyntaxItem | SEG_SYNTAX_ITEM |
| Data structure of nodes for the syntax. | |
| typedef segSyntax | SEG_SYNTAX |
| Data structure of the syntax. | |
Functions | |
| int | segMakeTrainingSyntax (SEG_SYNTAX *, int *, SEG_UTT_LIST_ITEM *, SEG_MODEL_SET *) |
| Create 'forced alignment' syntax (for supervised training and classification). | |
| int | segMakeRecognitionSyntax (SEG_SYNTAX *, SEG_MODEL_SET *, SEG_GRAMMAR *, double, int) |
| Create recognition syntax. | |
| int | segCheckSyn (SEG_MODEL_SET *, SEG_SYNTAX *) |
| Display the contents of syntax for debugging. | |
| int | segFreeSyntaxMemory (SEG_SYNTAX *, int) |
| Free memory allocated to training/recognition syntax. | |
| typedef struct segSyntax SEG_SYNTAX |
Data structure of the syntax.
The syntax is an array of nodes (of struct syntaxItem), which are concatenated states of the appropriate models.
| typedef struct segSyntaxItem SEG_SYNTAX_ITEM |
Data structure of nodes for the syntax.
Each of the nodes includes its type, entry and exit costs, pointers to predecessors, a pointer to the model it belongs to, and a pointer to the definition of the state.
| int segCheckSyn | ( | SEG_MODEL_SET * | models, | |
| SEG_SYNTAX * | synt | |||
| ) |
Display the contents of syntax for debugging.
| [in] | models | Model set (pointer to a variable of struct modelSet) |
| [in] | synt | Syntax (pointer to a variable of struct syntax) |
| int segFreeSyntaxMemory | ( | SEG_SYNTAX * | synt, | |
| int | totStates | |||
| ) |
Free memory allocated to training/recognition syntax.
| [in] | synt | Syntax |
| [in] | totStates | Number of states in the syntax |
| NO_ERROR |
| int segMakeRecognitionSyntax | ( | SEG_SYNTAX * | synt, | |
| SEG_MODEL_SET * | models, | |||
| SEG_GRAMMAR * | grammar, | |||
| double | lmff, | |||
| int | recogType | |||
| ) |
Create recognition syntax.
| [in,out] | synt | Syntax to be built |
| [in] | models | Set of models with model parameters |
| [in] | grammar | N-gram posterior probability table |
| [in] | lmff | Scale factor for the language model |
| [in] | recogType | Type of testing (RECOGNITION or CLASSIFICATION) |
| RTN_ERROR | Memory allocation error / Inconsistency between models | |
| otherwise | Number of nodes in the syntax |
| int segMakeTrainingSyntax | ( | SEG_SYNTAX * | synt, | |
| int * | eStates, | |||
| SEG_UTT_LIST_ITEM * | utt, | |||
| SEG_MODEL_SET * | models | |||
| ) |
Create 'forced alignment' syntax (for supervised training and classification).
| [in,out] | synt | Syntax to be built |
| [in,out] | eStates | Number of emitting states |
| [in] | models | Set of models with model parameters |
| [in] | utt | Utterance |
| ERROR_ALLOC | Memory allocation error | |
| RTN_ERROR | A label in utt cannot be found in models | |
| otherwise | Number of nodes in the syntax |
1.5.1