#include "ngram.h"
Go to the source code of this file.
Functions | |
unsigned short | num_of_types (int k, int ind, ng_t *ng) |
int | get_ngram (FILE *id_ngram_fp, ngram *ng, flag is_ascii) |
void | calc_mem_req (ng_t *ng, flag is_ascii) |
void | write_arpa_lm (ng_t *ng, int verbosity) |
void | write_bin_lm (ng_t *ng, int verbosity) |
unsigned short | new_index (int full_index, int *ind_table, unsigned short *ind_table_size, int position_in_list) |
int | get_full_index (unsigned short short_index, int *ind_table, int ind_table_size, int position_in_list) |
void | compute_gt_discount (int n, int *freq_of_freq, int fof_size, unsigned short *disc_range, int cutoff, int verbosity, disc_val_t **discounted_values) |
int | lookup_index_of (int *lookup_table, int lookup_table_size, int intintval) |
void | compute_unigram (ng_t *ng, int verbosity) |
void | compute_back_off (ng_t *ng, int n, int verbosity) |
void | bo_ng_prob (int context_length, id__t *sought_ngram, ng_t *ng, int verbosity, double *p_prob, int *bo_case) |
void | increment_context (ng_t *ng, int k, int verbosity) |
unsigned short | short_alpha (double long_alpha, double *alpha_array, unsigned short *size_of_alpha_array, int elements_in_range, double min_range, double max_range) |
double | double_alpha (unsigned short short_alpha, double *alpha_array, int size_of_alpha_array, int elements_in_range, double min_range, double max_range) |
void | guess_mem (int total_mem, int middle_size, int end_size, int n, table_size_t *table_sizes, int verbosity) |
void | read_voc (char *filename, int verbosity, sih_t *p_vocab_ht, char ***p_vocab, unsigned short *p_vocab_size) |
void | store_count (flag four_byte_counts, int *count_table, int count_table_size, unsigned short *short_counts, int *long_counts, int position, int count) |
int | return_count (flag four_byte_counts, int *count_table, unsigned short *short_counts, int *long_counts, int position) |
Definition in file idngram2lm.h.
|
|
Definition at line 36 of file calc_mem_req.c. References ngram::count, count_t, ng_t::cutoffs, flag, get_ngram(), i, ngram::id_array, ng_t::id_gram_filename, ng_t::id_gram_fp, j, ngram::n, ng_t::n, rr_calloc(), rr_feof(), rr_iclose(), rr_iopen(), rr_malloc(), and ng_t::table_sizes. Referenced by main(). |
|
|
Definition at line 31 of file compute_discount.c. References disc_val_t, flag, MIN, pc_message(), rr_calloc(), and verbosity. Referenced by main(). |
|
Definition at line 67 of file compute_unigram.c. References ng_t::abs_disc_const, ABSOLUTE, CLOSED_VOCAB, ng_t::context_cue, ng_t::count, ng_t::count4, ng_t::count_table, ng_t::disc_range, ng_t::discounting_method, ng_t::first_id, ng_t::four_byte_counts, fprintf(), ng_t::freq_of_freq, GOOD_TURING, ng_t::gt_disc_ratio, i, ng_t::lin_disc_ratio, LINEAR, ng_t::n_unigrams, ng_t::no_of_ccs, ng_t::oov_fraction, OPEN_VOCAB_2, pc_message(), quit(), return_count(), ng_t::uni_log_probs, ng_t::uni_probs, verbosity, ng_t::vocab_size, ng_t::vocab_type, WITTEN_BELL, and ng_t::zeroton_fraction. Referenced by main(). |
|
Definition at line 95 of file two_byte_alphas.c. References quit(), and short_alpha(). Referenced by bo_ng_prob(), and for(). |
|
|
|
Definition at line 31 of file get_ngram.c. |
|
Definition at line 35 of file guess_mem.c. References i, pc_message(), rr_malloc(), table_size_t, and verbosity. Referenced by main(). |
|
Definition at line 27 of file increment_context.c. References ng_t::count, ng_t::count4, ng_t::count_table, ng_t::count_table_size, current_pos, ng_t::disc_range, end_pos, ng_t::first_id, flag, ng_t::four_byte_counts, free(), get_full_index(), ng_t::ind, j, ng_t::marg_counts, ng_t::marg_counts4, ng_t::num_kgrams, ng_t::ptr_table, ng_t::ptr_table_size, return_count(), rr_calloc(), store_count(), verbosity, and ng_t::vocab_size. Referenced by main(). |
|
|
|
Definition at line 51 of file short_indices.c. References KEY. Referenced by load_arpa_lm(), and main(). |
|
Definition at line 23 of file num_of_types.c. References get_full_index(), ng_t::ind, ng_t::num_kgrams, ng_t::ptr_table, ng_t::ptr_table_size, and ng_t::vocab_size. Referenced by bo_ng_prob(), and compute_back_off(). |
|
Definition at line 34 of file read_voc.c. References get_vocab_from_vocab_ht(), sih_t::nentries, read_wlist_into_array(), read_wlist_into_siht(), rr_iclose(), rr_iopen(), salloc(), sih_val_read_from_file(), and verbosity. Referenced by main(). |
|
Definition at line 48 of file counts.c. References flag. Referenced by bo_ng_prob(), compute_back_off(), compute_unigram(), increment_context(), and main(). |
|
Definition at line 46 of file two_byte_alphas.c. Referenced by compute_back_off(), and double_alpha(). |
|
Definition at line 30 of file counts.c. References flag, and lookup_index_of(). Referenced by increment_context(), and main(). |
|
Definition at line 32 of file write_lms.c. References current_pos, end_pos, and verbosity. Referenced by main(). |
|