misc.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
00002 /* ====================================================================
00003  * Copyright (c) 1995-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  * misc.h -- Misc. routines (especially I/O) needed by many S3 applications.
00039  * 
00040  * **********************************************
00041  * CMU ARPA Speech Project
00042  *
00043  * Copyright (c) 1996 Carnegie Mellon University.
00044  * ALL RIGHTS RESERVED.
00045  * **********************************************
00046  * 
00047  * HISTORY
00048  * $Log: misc.h,v $
00049  * Revision 1.4  2005/06/21 20:52:00  arthchan2003
00050  * 1, remove hyp_free, it is now in the implementation of dag.c , 2, add incomplete comments for misc.h. 3, Added $ keyword.
00051  *
00052  * Revision 1.3  2005/03/30 01:22:47  archan
00053  * Fixed mistakes in last updates. Add
00054  *
00055  * 
00056  * 26-Jul-04    ARCHAN (archan@cs.cmu.edu) at Carngie Mellon Unversity 
00057  *              Adapted  fro
00058  * 12-Nov-96    M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
00059  *              Created.
00060  */
00061 
00062 
00063 #ifndef _LIBFBS_MISC_H_
00064 #define _LIBFBS_MISC_H_
00065 
00066 #include <stdio.h>
00067 
00068 #include "s3types.h"
00069 #include "search.h"
00070 
00076 #ifdef __cplusplus
00077 extern "C" {
00078 #endif
00079 #if 0
00080 /* Fool Emacs. */
00081 }
00082 #endif
00083 
00085 FILE *ctlfile_open (char *file 
00086                     );
00087 
00092 int32 ctlfile_next (FILE *fp, 
00093                     char *ctlspec, 
00094                     int32 *sf_out, 
00095                     int32 *ef_out, 
00096                     char *uttid 
00097                     );
00098 
00103 void  ctlfile_close (FILE *fp 
00104                      );
00105 
00108 int32 argfile_load (char *file, 
00109                     char *pgm,  
00110                     char ***argvout 
00111                     );
00112 
00113 /*
00114  * Read an Nbest file and create an array of hypotheses (array of hyp_t lists).
00115  * Return value: #hypotheses read, -1 if unsuccessful.
00116  */
00117 int32 nbestfile_load(char *dir, char *uttid, srch_hyp_t *** hyplist_out);
00118 
00119 void nbestlist_free(srch_hyp_t ** hyplist, int32 nhyp);
00120 
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124 
00125 
00126 #endif

Generated on 7 Mar 2010 by  doxygen 1.6.1