srch_output.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
00002 /* ====================================================================
00003  * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
00004  * reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer. 
00012  *
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in
00015  *    the documentation and/or other materials provided with the
00016  *    distribution.
00017  *
00018  * This work was supported in part by funding from the Defense Advanced 
00019  * Research Projects Agency and the National Science Foundation of the 
00020  * United States of America, and the CMU Sphinx Speech Consortium.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
00023  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
00024  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00025  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
00026  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  *
00034  * ====================================================================
00035  *
00036  */
00037 
00038 /* srch_output.h
00039  * HISTORY
00040  * $Log$
00041  * Revision 1.1  2006/04/05  20:27:30  dhdfu
00042  * A Great Reorganzation of header files and executables
00043  * 
00044  * Revision 1.2  2006/02/23 05:13:26  arthchan2003
00045  * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: A wrapper for the outptu functions of the search routine
00046  *
00047  * Revision 1.1.2.1  2006/01/17 01:24:21  arthchan2003
00048  * The home of log output functions.
00049  *
00050  */
00051 
00052 #include <stdio.h>
00053 
00054 #include <s3types.h>
00055 #include <glist.h>
00056 #include <dict.h>
00057 #include <lm.h>
00058 #include <search.h>
00059 
00060 
00061 #ifndef _SRCH_OUTPUT_H_
00062 #define _SRCH_OUTPUT_H_
00063 
00064 
00065 #ifdef __cplusplus
00066 extern "C" {
00067 #endif
00068 #if 0
00069 /* Fool Emacs. */
00070 }
00071 #endif
00072 
00073 #define HYPSEG_SUCCESS 1
00074 #define HYPSEG_FAILURE 0
00075 #define WORST_CONFIDENCE_SCORE ((int)0xE0000000)
00076 
00077 int32 compute_scale(int32 sf, int32 ef, int32* scalearray);
00078 
00090 S3DECODER_EXPORT
00091 void match_write (FILE *fp,  
00092                   glist_t hyp, 
00093                   char* uttid, 
00094                   dict_t* dict, 
00095                   char *hdr    
00096     );
00097 
00099 S3DECODER_EXPORT
00100 void matchseg_write (FILE *fp,  
00101                      glist_t hyp, 
00102                      char *uttid, 
00103                      char *hdr, 
00104                      lm_t * lm, 
00105                      dict_t * dict, 
00106                      int32 num_frm, 
00107                      int32 *scl,     
00109                      int32 unnorm   
00110     );
00111 
00112 
00113 
00118 void match_detailed(FILE* fp, 
00119                     glist_t hyp,  
00120                     char* uttid,  
00121                     char* LBL,    
00122                     char* lbl,    
00123                     int32* senscale, 
00127                     dict_t *dict  
00128     );
00129 
00130 
00134 S3DECODER_EXPORT
00135 int read_s3hypseg_line(char *line,  
00136                        seg_hyp_line_t *seg_hyp_line,  
00137                        lm_t* lm,  
00138                        dict_t *dict 
00139     );
00140 
00141 S3DECODER_EXPORT
00142 int free_seg_hyp_line(seg_hyp_line_t *seg_hyp_line);
00143 
00149 S3DECODER_EXPORT
00150 void log_hypstr (FILE *fp,  
00151                  srch_hyp_t *hypptr,  
00152                  char *uttid,   
00153                  int32 exact,   
00154                  int32 scr,      
00155                  dict_t *dict    
00156     );
00157 
00158 
00159 S3DECODER_EXPORT
00160 void log_hyp_detailed (FILE *fp, 
00161                        srch_hyp_t *hypptr,  
00162                        char *uttid,         
00163                        char *LBL,           
00164                        char *lbl,           
00165                        int32* senscale      
00169     );
00170 
00176 void log_hypseg (char *uttid,   
00177                  FILE *fp,      
00178                  srch_hyp_t *hypptr,    
00179                  int32 nfrm,    
00180                  int32 scl,     
00181                  float64 lwf,   
00182                  dict_t* dict,  
00183                  lm_t *lm,       
00184                  int32 unnorm   
00185     );
00186 
00187 #ifdef __cplusplus
00188 }
00189 #endif
00190 
00191 
00192 #endif 

Generated on 7 Mar 2010 by  doxygen 1.6.1