#include <stdio.h>
#include <sys/types.h>
#include <math.h>
#include <string.h>
Go to the source code of this file.
Defines | |
#define | CMU_SLM_VERSION "CMU SLM Toolkit, Version for internal CMU use" |
#define | MIN(X, Y) ( ((X)<(Y)) ? (X) : (Y)) |
#define | MAX(X, Y) ( ((X)>(Y)) ? (X) : (Y)) |
#define | LOG_BASE 9.9995e-5 |
#define | MIN_LOG -690810000 |
#define | LOG(x) |
#define | EXP(x) (exp ((double) (x) * LOG_BASE)) |
#define | quit0(rc, msg) {fprintf(stderr,msg); exit(rc);} |
#define | quit1(rc, msg, i1) {fprintf(stderr,msg,i1); exit(rc);} |
#define | quit2(rc, msg, i1, i2) {fprintf(stderr,msg,i1,i2); exit(rc);} |
#define | quit3(rc, msg, i1, i2, i3) {fprintf(stderr,msg,i1,i2,i3); exit(rc);} |
#define | quit4(rc, msg, i1, i2, i3, i4) {fprintf(stderr,msg,i1,i2,i3,i4); exit(rc);} |
#define | MAX_WORDS_PER_DOC 65534 |
Typedefs | |
typedef int | int32 |
typedef short | int16 |
typedef char | Boolean |
typedef unsigned short | wordid_t |
typedef int | cluster_t |
Functions | |
FILE * | rr_fopen (char *filename, char *mode) |
void * | rr_fseek (FILE *fp, int offset, int mode, char *description) |
void * | rr_fread () |
void * | rr_fwrite () |
char * | rr_malloc (size_t n_bytes) |
char * | rr_calloc (size_t nelem, size_t elsize) |
int | rr_filesize (int fd) |
int | rr_feof (FILE *fp) |
char * | salloc (char *str) |
int | rr_fexists (char *path) |
FILE * | rr_iopen (char *path) |
void * | rr_iclose (FILE *fp) |
FILE * | rr_oopen (char *path) |
void * | rr_oclose (FILE *fp) |
void | parse_line (char *line, int mwords, int canonize, char **pword_begin, char **pword_end, int *p_nwords, int *p_overflow) |
int | quit (int rc, char *msg,...) |
Definition in file general.h.
|
|
|
|
|
Value: |
|
|
|
Definition at line 81 of file general.h. Referenced by main(), merge_tempfiles(), rr_calloc(), rr_malloc(), and sih_create(). |
|
|
|
Definition at line 78 of file general.h. Referenced by compute_gt_discount(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 73 of file general.h. Referenced by main(). |
|
|
|
|
|
the following should be made machine-dependent Definition at line 33 of file general.h. Referenced by sih_add(), sih_lookup(), sih_val_read_from_file(), and sih_val_write_to_file(). |
|
|
|
Definition at line 24 of file parse_line.c. |
|
|
customized version of calloc Definition at line 32 of file rr_calloc.c. Referenced by calc_mem_req(), compute_back_off(), compute_gt_discount(), compute_perplexity(), gen_fb_list(), increment_context(), load_arpa_lm(), load_lm(), main(), merge_tempfiles(), sih_add(), sih_create(), and sih_val_read_from_file(). |
|
customized version of feof Definition at line 29 of file rr_feof.c. References quit(). Referenced by calc_mem_req(), compute_perplexity(), get_ngram(), load_arpa_lm(), main(), and merge_tempfiles(). |
|
check whether a file exists Definition at line 24 of file rr_fexists.c. Referenced by compute_perplexity(), and rr_iopen(). |
|
get the file size of a file handle Definition at line 24 of file rr_filesize.c. |
|
customized version of fopen Definition at line 25 of file rr_fopen.c. References quit(). Referenced by main(), rr_iopen(), and rr_oopen(). |
|
customized version of fread Referenced by get_ngram(), load_lm(), main(), merge_tempfiles(), and sih_val_read_from_file(). |
|
customized version of fseek Definition at line 30 of file rr_fseek.c. References quit(). |
|
customized version of fwrite Referenced by main(), merge_tempfiles(), sih_val_write_to_file(), write_bin_lm(), and write_ngram(). |
|
Definition at line 103 of file rr_iopen.c. References RRi_is_Z. Referenced by calc_mem_req(), compute_perplexity(), gen_fb_list(), load_arpa_lm(), load_lm(), main(), merge_tempfiles(), read_voc(), and read_wlist_into_siht(). |
|
Definition at line 44 of file rr_iopen.c. References quit(), rr_fexists(), rr_fopen(), and RRi_is_Z. Referenced by calc_mem_req(), compute_perplexity(), gen_fb_list(), load_arpa_lm(), load_lm(), main(), merge_tempfiles(), read_voc(), and read_wlist_into_siht(). |
|
customized version of malloc Definition at line 31 of file rr_malloc.c. Referenced by arpa_bo_ng_prob(), bo_ng_prob(), calc_mem_req(), calc_prob_of(), compute_perplexity(), get_vocab_from_vocab_ht(), guess_mem(), load_arpa_lm(), load_lm(), main(), merge_tempfiles(), new_node(), pc_intarrayarg(), pc_shortarrayarg(), salloc(), sih_create(), sih_val_read_from_file(), and validate(). |
|
Definition at line 82 of file rr_oopen.c. |
|
open a file, it can also handle .Z and .gz extension Definition at line 43 of file rr_oopen.c. References quit(), rr_fopen(), and RRo_is_Z. Referenced by compute_perplexity(), main(), and merge_tempfiles(). |
|
customized version of salloc Definition at line 25 of file salloc.c. References rr_malloc(). Referenced by load_arpa_lm(), load_lm(), main(), merge_tempfiles(), parse_comline(), read_voc(), and read_wlist_into_siht(). |