/**************************************************************************/ /* File: grammar.h */ /**************************************************************************/ /* Project: Continuous Speech Recognition Search Algorithms */ /* Author: Neeraj Deshmukh, Aravind Ganapathiraju */ /* Class: EE 8993 Spring 1996 Date: March 27, 1996 */ /**************************************************************************/ /*======================================================================== This file declares the grammar class that outlines the language model structure used in the speech recognizer ========================================================================*/ /*------------------------------------------------------------------------ make sure definitions are only made once ------------------------------------------------------------------------*/ #ifndef __ISIP_GRAMMAR #define __ISIP_GRAMMAR /*------------------------------------------------------------------------ system and ISIP include files ------------------------------------------------------------------------*/ #include "gram_state.h" /*------------------------------------------------------------------------ forward declaration of classes ------------------------------------------------------------------------*/ class Linked_List; class Trans_State; class Gram_State; class Grammar; /*======================================================================== Grammar class definition for the language model grammar ========================================================================*/ class Grammar { // members // protected: Gram_State *states_ptr; // methods // public: /*------------------------ constructor & destructor ------------------------*/ Grammar (); ~Grammar (); /*--------------------- input / output method ---------------------*/ void read_grammar_cc (FILE *gram_file_ptr); Gram_State *get_states_ptr_cc (); Gram_State *get_start_state_cc (); Gram_State *add_state_cc (String state_name); float_8 get_trans_score_cc (String from_state_name, String to_state_name); void print_grammar_cc (FILE *outFile); }; #endif