Main Page
Classes
Files
File List
File Members
include
misc.h
Go to the documentation of this file.
1
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
/* ====================================================================
3
* Copyright (c) 1995-2004 Carnegie Mellon University. All rights
4
* reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
*
10
* 1. Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
*
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in
15
* the documentation and/or other materials provided with the
16
* distribution.
17
*
18
* This work was supported in part by funding from the Defense Advanced
19
* Research Projects Agency and the National Science Foundation of the
20
* United States of America, and the CMU Sphinx Speech Consortium.
21
*
22
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
23
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
26
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
*
34
* ====================================================================
35
*
36
*/
37
/*
38
* misc.h -- Misc. routines (especially I/O) needed by many S3 applications.
39
*
40
* **********************************************
41
* CMU ARPA Speech Project
42
*
43
* Copyright (c) 1996 Carnegie Mellon University.
44
* ALL RIGHTS RESERVED.
45
* **********************************************
46
*
47
* HISTORY
48
* $Log: misc.h,v $
49
* Revision 1.4 2005/06/21 20:52:00 arthchan2003
50
* 1, remove hyp_free, it is now in the implementation of dag.c , 2, add incomplete comments for misc.h. 3, Added $ keyword.
51
*
52
* Revision 1.3 2005/03/30 01:22:47 archan
53
* Fixed mistakes in last updates. Add
54
*
55
*
56
* 26-Jul-04 ARCHAN (archan@cs.cmu.edu) at Carngie Mellon Unversity
57
* Adapted fro
58
* 12-Nov-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
59
* Created.
60
*/
61
62
63
#ifndef _LIBFBS_MISC_H_
64
#define _LIBFBS_MISC_H_
65
66
#include <stdio.h>
67
68
#include "
s3types.h
"
69
#include "
search.h
"
70
76
#ifdef __cplusplus
77
extern
"C"
{
78
#endif
79
#if 0
80
/* Fool Emacs. */
81
}
82
#endif
83
85
FILE *
ctlfile_open
(
char
*file
86
);
87
92
int32
ctlfile_next
(FILE *fp,
93
char
*ctlspec,
94
int32 *sf_out,
95
int32 *ef_out,
96
char
*uttid
97
);
98
103
void
ctlfile_close
(FILE *fp
104
);
105
108
int32
argfile_load
(
char
*file,
109
char
*pgm,
110
char
***argvout
111
);
112
113
/*
114
* Read an Nbest file and create an array of hypotheses (array of hyp_t lists).
115
* Return value: #hypotheses read, -1 if unsuccessful.
116
*/
117
int32
nbestfile_load
(
char
*dir,
char
*uttid,
srch_hyp_t
*** hyplist_out);
118
119
void
nbestlist_free
(
srch_hyp_t
** hyplist, int32 nhyp);
120
121
#ifdef __cplusplus
122
}
123
#endif
124
125
126
#endif
Generated by
1.8.3.1