// file: dec_lat_1.cc
//
 
// isip include files
//
#include "decoder.h"
#include "decoder_constants.h"
 
// method: read_lattice_cc
//
// arguments:
//  char_1* str: (input) the transcription string to put in lattice format
//  
// return: a logical_1 indicating status
//
// this method converts the input transcription string into a lattice
// format to be decoded for forced alignment purposes
//
logical_1 Decoder::read_lattice_cc(char_1* str_a) {

  // check input string
  //
  if (str_a == (char_1*)NULL) {
    error_handler_cc((char_1*)"read_lattice_cc",
		     (char_1*)"NULL input transcription string");
  }
  
  // initialize lattice if not done so
  //
  if (lattice_d == (Lattice*)NULL) {
    lattice_d = new Lattice();
  }

  // create a lattice from the transcription string
  //
  lattice_d->read_trans_cc(str_a, lexicon_d);
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
