1/*---------------------------------------------------------------------------*
2 *  srec_results.h  *
3 *                                                                           *
4 *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
5 *                                                                           *
6 *  Licensed under the Apache License, Version 2.0 (the 'License');          *
7 *  you may not use this file except in compliance with the License.         *
8 *                                                                           *
9 *  You may obtain a copy of the License at                                  *
10 *      http://www.apache.org/licenses/LICENSE-2.0                           *
11 *                                                                           *
12 *  Unless required by applicable law or agreed to in writing, software      *
13 *  distributed under the License is distributed on an 'AS IS' BASIS,        *
14 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15 *  See the License for the specific language governing permissions and      *
16 *  limitations under the License.                                           *
17 *                                                                           *
18 *---------------------------------------------------------------------------*/
19
20#ifndef __SREC_RESULTS_H__
21#define __SREC_RESULTS_H__
22
23#include"srec.h"
24
25#ifdef __cplusplus
26extern "C"
27{
28#endif
29
30  /* results */
31  int srec_has_results(multi_srec* rec);
32  int srec_clear_results(multi_srec* rec);
33  int srec_get_bestcost_recog_id(multi_srec* rec, int* id);
34
35  /* nbest */
36  void* srec_nbest_prepare_list(multi_srec* rec, int n, asr_int32_t* bestcost);
37  void srec_nbest_destroy_list(void* nbest);
38  int srec_nbest_get_num_choices(void* nbest);
39  int srec_nbest_put_confidence_value(void* rec_void, int choice, int confidence_value);
40  int srec_nbest_get_confidence_value(void* rec_void, int choice);
41  int srec_nbest_fix_homonym_confidence_values(void* rec_void);
42  int srec_nbest_get_result(void* nbest, int n, char* label, int label_len, asr_int32_t* cost, int whether_strip_slot_markers);
43  LCHAR* srec_nbest_get_word(void* nbest, size_t choice);
44  ESR_ReturnCode srec_nbest_get_resultWordIDs(void* nbest, size_t inde, wordID* wordIDs, size_t* len, asr_int32_t* cost);
45  void srec_result_strip_slot_markers(char* result);
46  int srec_nbest_get_choice_info(void* rec_void, int ibest, asr_int32_t* infoval, char* infoname);
47  int srec_nbest_remove_result(void* rec_void, int n);
48  int srec_nbest_sort(void* rec_void);
49
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif
56