srch_output.h File Reference
#include <stdio.h>
#include <s3types.h>
#include <glist.h>
#include <dict.h>
#include <lm.h>
#include <search.h>
Go to the source code of this file.
Defines |
#define | HYPSEG_SUCCESS 1 |
#define | HYPSEG_FAILURE 0 |
#define | WORST_CONFIDENCE_SCORE ((int)0xE0000000) |
Functions |
int32 | compute_scale (int32 sf, int32 ef, int32 *scalearray) |
S3DECODER_EXPORT void | match_write (FILE *fp, glist_t hyp, char *uttid, dict_t *dict, char *hdr) |
S3DECODER_EXPORT void | matchseg_write (FILE *fp, glist_t hyp, char *uttid, char *hdr, lm_t *lm, dict_t *dict, int32 num_frm, int32 *scl, int32 unnorm) |
void | match_detailed (FILE *fp, glist_t hyp, char *uttid, char *LBL, char *lbl, int32 *senscale, dict_t *dict) |
S3DECODER_EXPORT int | read_s3hypseg_line (char *line, seg_hyp_line_t *seg_hyp_line, lm_t *lm, dict_t *dict) |
S3DECODER_EXPORT int | free_seg_hyp_line (seg_hyp_line_t *seg_hyp_line) |
S3DECODER_EXPORT void | log_hypstr (FILE *fp, srch_hyp_t *hypptr, char *uttid, int32 exact, int32 scr, dict_t *dict) |
S3DECODER_EXPORT void | log_hyp_detailed (FILE *fp, srch_hyp_t *hypptr, char *uttid, char *LBL, char *lbl, int32 *senscale) |
void | log_hypseg (char *uttid, FILE *fp, srch_hyp_t *hypptr, int32 nfrm, int32 scl, float64 lwf, dict_t *dict, lm_t *lm, int32 unnorm) |
Define Documentation
#define WORST_CONFIDENCE_SCORE ((int)0xE0000000) |
Function Documentation
int32 compute_scale |
( |
int32 |
sf, |
|
|
int32 |
ef, |
|
|
int32 * |
scalearray | |
|
) |
| | |
S3DECODER_EXPORT int free_seg_hyp_line |
( |
seg_hyp_line_t * |
seg_hyp_line |
) |
|
S3DECODER_EXPORT void log_hyp_detailed |
( |
FILE * |
fp, |
|
|
srch_hyp_t * |
hypptr, |
|
|
char * |
uttid, |
|
|
char * |
LBL, |
|
|
char * |
lbl, |
|
|
int32 * |
senscale | |
|
) |
| | |
- Parameters:
-
| fp | A file poointer |
| hypptr | A srch_hyp_t |
| uttid | An utternace ID |
| LBL | A header in cap |
| lbl | A header in small |
| senscale | Senone scale vector, if specified, normalized score would be displayed, if not, the unormalized score would be displayed. |
void log_hypseg |
( |
char * |
uttid, |
|
|
FILE * |
fp, |
|
|
srch_hyp_t * |
hypptr, |
|
|
int32 |
nfrm, |
|
|
int32 |
scl, |
|
|
float64 |
lwf, |
|
|
dict_t * |
dict, |
|
|
lm_t * |
lm, |
|
|
int32 |
unnorm | |
|
) |
| | |
CODE DUPLICATION!!! Sphinx 3.0 family of logging hyp and hyp segments When hyp_t, srch_hyp_t are united, we could tie it with match_write (20051109) ARCHAN: The only consumer of log_hypseg now is main_dag.c
- Parameters:
-
| uttid | Input; uttid |
| fp | Out: output file |
| hypptr | In: Hypothesis |
| nfrm | In: #frames in utterance |
| scl | In: Acoustic scaling for entire utt |
| lwf | In: LM score scale-factor (in dagsearch) |
| dict | In: dictionary |
| lm | In: LM |
| unnorm | Whether unscaled the score back |
S3DECODER_EXPORT void log_hypstr |
( |
FILE * |
fp, |
|
|
srch_hyp_t * |
hypptr, |
|
|
char * |
uttid, |
|
|
int32 |
exact, |
|
|
int32 |
scr, |
|
|
dict_t * |
dict | |
|
) |
| | |
CODE DUPLICATION!!! Sphinx 3.0 family of logging hyp and hyp segments When hyp_t, srch_hyp_t are united, we could tie it with match_write (20051109) ARCHAN: The only consumer of log_hypstr now is main_dag.c
- Parameters:
-
| fp | A file pointer |
| hypptr | A srch_hyp_t |
| uttid | An utterance ID |
| exact | Whether to dump an exact |
| scr | The score |
| dict | A dictionary to look up wid |
void match_detailed |
( |
FILE * |
fp, |
|
|
glist_t |
hyp, |
|
|
char * |
uttid, |
|
|
char * |
LBL, |
|
|
char * |
lbl, |
|
|
int32 * |
senscale, |
|
|
dict_t * |
dict | |
|
) |
| | |
wrapping up the detail match display. Comparable with log_hyp_detailed . The only difference is match_detailed use a link list of srch_hyp_t
- Parameters:
-
| fp | The file pointer |
| hyp | A link-list that containt the hypothesis |
| uttid | The utterance ID |
| LBL | A header in cap |
| lbl | A header in small |
| senscale | Senone scale vector, if specified, normalized score would be displayed, if not, the unormalized score would be displayed. |
| dict | Dictionary |
S3DECODER_EXPORT void match_write |
( |
FILE * |
fp, |
|
|
glist_t |
hyp, |
|
|
char * |
uttid, |
|
|
dict_t * |
dict, |
|
|
char * |
hdr | |
|
) |
| | |
write a match file
NOTE: Current match_write has four features which is different with log_hypstr. 1, match_write allows the use of hdr. 2, log_hypstr allows matchexact in output. 3, log_hypstr allows output the score after the match file name. 4, log_hypstr will dump the pronounciation variation to the code.
I don't think they are very important in processing so I removed them.
- Parameters:
-
| fp | The file pointer |
| hyp | A link-list that contains the hypothesis |
| uttid | Utterance id |
| dict | The dictionary |
| hdr | The header |
S3DECODER_EXPORT void matchseg_write |
( |
FILE * |
fp, |
|
|
glist_t |
hyp, |
|
|
char * |
uttid, |
|
|
char * |
hdr, |
|
|
lm_t * |
lm, |
|
|
dict_t * |
dict, |
|
|
int32 |
num_frm, |
|
|
int32 * |
scl, |
|
|
int32 |
unnorm | |
|
) |
| | |
write match segment
- Parameters:
-
| fp | The file pointer |
| hyp | A link-list that contains the hypotheesis |
| uttid | Utterance ID of the file |
| hdr | The header |
| lm | Language model |
| dict | Dictionary |
| num_frm | Number of frames |
| scl | Scale of the decoding. Required, if inverse normalization |
| unnorm | Whether unscaled the score back |
A funtion that reads the s3 hypseg line.
- Parameters:
-
| line | A line pointer |
| seg_hyp_line | A hypseg line structure |
| lm | A LM |
| dict | A dictionary |