// file: trace_projector_constants.h
//
// definitions file for the trace projetion decoder
//

// make sure definitions are made only once
//
#ifndef __ISIP_TRACE_PROJECTOR_CONSTANTS
#define __ISIP_TRACE_PROJECTOR_CONSTANTS

// isip include files
//
#ifndef __ISIP_INTEGRAL_CONSTANTS
#include <integral_constants.h>
#endif

#ifndef __ISIP_DECODER_CONSTANTS
#include <decoder_constants.h>
#endif

// define the help file
//
#define TP_HELP_FILE (char_1*)"$ISIP_PROTO/doc/trace_projector.help"

// block sizes for traces
//
#define TP_DEFAULT_BLOCK_SIZE (int_4)9999
#define TP_NODE_BLOCK_SIZE (int_4)99999

// number of levels
//
#define TP_NUM_LEVELS DEC_NUM_LEVELS

// path number constants
//
#define TP_OP_HISTORY "history_paths"
#define TP_OP_NBEST "nbest_paths"
#define TP_NUM_HISTORY DEC_NUM_HISTORY 
#define TP_NUM_NBEST DEC_NUM_NBEST

// define how many backpointers are to be kept at each level
//
#define TP_STATE_BACKPTR TP_NUM_HISTORY
#define TP_PHONE_BACKPTR TP_NUM_HISTORY
#define TP_WORD_BACKPTR TP_NUM_HISTORY

// acoustic model related constants
//
#define TP_MONOPHONE_SIZE DEC_MONOPHONE_SIZE
#define TP_TRIPHONE_SIZE DEC_TRIPHONE_SIZE

// define context mode
//
#define TP_OP_CONTEXT_MODE "context_mode"
#define TP_OP_MONO_PHONE "monophone"
#define TP_OP_WORD_INTERNAL "word_internal"
#define TP_OP_CROSS_WORD "cross_word"
#define TP_MONO_PHONE_MODE DEC_MONO_PHONE_MODE
#define TP_WORD_INTERNAL_MODE DEC_WORD_INTERNAL_MODE
#define TP_CROSS_WORD_MODE DEC_CROSS_WORD_MODE

// define alignment level mode
//
#define TP_OP_ALIGN_MODE "align_mode"
#define TP_OP_STATE_ALIGN "state"
#define TP_OP_MODEL_ALIGN "model"
#define TP_OP_WORD_ALIGN "word"
#define TP_STATE_ALIGN_MODE DEC_STATE_ALIGN_MODE
#define TP_MODEL_ALIGN_MODE DEC_MODEL_ALIGN_MODE
#define TP_WORD_ALIGN_MODE DEC_WORD_ALIGN_MODE 

// define input format
//
#define TP_OP_INPUT_FORMAT "input_format"
#define TP_OP_BINARY "binary"
#define TP_OP_ASCII "ascii"
#define TP_BINARY_FORMAT DEC_BINARY_FORMAT
#define TP_ASCII_FORMAT DEC_ASCII_FORMAT

// define input feature file format
//
#define TP_OP_INPUT_FEATURE_FORMAT "input_feature_format"
#define TP_OP_HTK "htk"
#define TP_OP_ISIP_PROTO "isip_proto"
#define TP_HTK_FORMAT DEC_HTK_FORMAT
#define TP_ISIP_PROTO_FORMAT DEC_ISIP_PROTO_FORMAT

// define delta calculation parameters
//
#define TP_OP_DELTA_WIN "delta_window"
#define TP_OP_COMPUTE_DELTA "compute_delta"
#define TP_OP_COMPUTE_ACC "compute_acc"
#define TP_OP_YES "yes"
#define TP_OP_NO "no"
#define TP_DF_DELTA_WIN (int_2)2
#define TP_DF_DELTA ISIP_FALSE
#define TP_DF_ACC ISIP_FALSE

// define functional mode
//
#define TP_OP_FUNCTION_MODE "function"
#define TP_OP_FORCE_ALIGN "forced_alignment"
#define TP_OP_LATTICE_RESCORE "lattice_rescoring"
#define TP_OP_NGRAM_DECODE "ngram_decoding"
#define TP_OP_LATTICE_GENERATE "lattice_generation"
#define TP_OP_LATTICE_VERIFY "lattice_verification"
#define TP_OP_LATTICE_LATTICE "lattice_to_lattice"
#define TP_OP_LATTICE_WER "lattice_error_rate"
#define TP_FORCE_ALIGN_FUNCTION DEC_FORCE_ALIGN_FUNCTION 
#define TP_LATTICE_RESCORE_FUNCTION DEC_LATTICE_RESCORE_FUNCTION 
#define TP_NGRAM_DECODE_FUNCTION DEC_NGRAM_DECODE_FUNCTION 
#define TP_LATTICE_GENERATE_FUNCTION DEC_LATTICE_GENERATE_FUNCTION 
#define TP_LATTICE_VERIFY_FUNCTION DEC_LATTICE_VERIFY_FUNCTION 
#define TP_LATTICE_LATTICE_FUNCTION DEC_LATTICE_LATTICE_FUNCTION 
#define TP_LATTICE_WER_FUNCTION DEC_LATTICE_WER_FUNCTION 

// pruning parameters
//
#define TP_OP_PRUNING "beam_pruning"
#define TP_OP_MAPMI "mapmi_limit"
#define TP_OP_NUMWORDS "num_allowed_words"

// nbest pruning parameters
//
#define TP_OP_NBEST_MAX_PATH "nbest_max_paths"
#define TP_OP_NBEST_BEAM "nbest_beam"
#define TP_NUM_NBEST_MAX_PATH DEC_NUM_NBEST_MAX_PATH
#define TP_NUM_NBEST_BEAM DEC_NUM_NBEST_BEAM

// acoustic data files
//
#define TP_OP_MONOPHONE_FILE "monophones_file"
#define TP_OP_TRANSITION_FILE "transitions_file"
#define TP_OP_STATE_FILE "states_file"
#define TP_OP_MODEL_FILE "models_file"
#define TP_OP_PHONE_FILE "phones_file"

// grammar / language model
//
#define TP_OP_LEXICON_FILE "lexicon_file"
#define TP_OP_LM_FILE "lm_file"
#define TP_OP_GRAM_FILE "grammar_list_file"
#define TP_OP_LATWER_FILE "lattice_wer_file"
#define TP_OP_LATTICE_LIST "input_lattice_list"
#define TP_OP_OUTLAT_LIST "output_lattice_list"

// transcription file for forced alignments
//
#define TP_OP_TRANSCRIPTION_FILE "transcription_file"

// default values for the language model
//
#define TP_OP_NGRAM "ngram_order"
#define TP_OP_LMSCALE "lm_scale"
#define TP_OP_WORDPENALTY "word_penalty"
#define TP_NGRAM_ORDER DEC_NGRAM_ORDER
#define TP_LM_SCALE DEC_LM_SCALE 
#define TP_WORD_PENALTY DEC_WORD_PENALTY 

// input / output file lists
//
#define TP_OP_MFCC_LIST "mfcc_list"
#define TP_OP_OUTPUT_LIST "output_list"
#define TP_OP_OUTNBEST_LIST "output_nbest_list"

// commandline identifiers
//
#define TP_PARAMS_OPT "-p"
#define TP_DEMO_OPT "-demo"
#define TP_HELP_OPT "-help"

// file i/o related constants
//
#define TP_WAIT_TIME 5
#define TP_WAIT_ITER 20

// frontend parameter file
//
#define TP_OP_FRONTEND_PARAMS "frontend_params"

// lattice compact flag
//
#define TP_OP_COMPACT_LATTICE "compact_lattice"

// define segment level mode
//
#define TP_OP_SEGMENT_MODE "segment_mode"
#define TP_OP_NONE_SEGMENT "none"
#define TP_OP_MODEL_SEGMENT "model"
#define TP_NONE_SEGMENT_MODE DEC_NONE_SEGMENT_MODE
#define TP_MODEL_SEGMENT_MODE DEC_MODEL_SEGMENT_MODE

// define the model level segment list
//
#define TP_OP_MODEL_SEGMENT_LIST "model_segment_list"

// end of file
//
#endif
