Main Page   Compound List   File List   Compound Members   File Members  

load_lm.c File Reference

Routines of loading LM. More...

#include <stdio.h>
#include "rr_libs/general.h"
#include "rr_libs/sih.h"
#include "ngram.h"
#include "evallm.h"
#include <string.h>
#include <stdlib.h>
#include "idngram2lm.h"

Go to the source code of this file.

Defines

#define BBO_FILE_VERSION   970314

Functions

void load_lm (ng_t *ng, char *lm_filename)
void load_arpa_lm (arpa_lm_t *arpa_lm, char *lm_filename)


Detailed Description

Routines of loading LM.

Definition in file load_lm.c.


Define Documentation

#define BBO_FILE_VERSION   970314
 

Definition at line 36 of file load_lm.c.

Referenced by load_lm().


Function Documentation

void load_arpa_lm arpa_lm_t   arpa_lm,
char *    lm_filename
 

Read an ARPA LM file from a text format ARPA LM file

Definition at line 316 of file load_lm.c.

References bo_t, arpa_lm_t::bo_weight, CLOSED_VOCAB, arpa_lm_t::first_id, flag, fprintf(), free(), get_full_index(), i, arpa_lm_t::ind, index__t, j, arpa_lm_t::n, new_index(), arpa_lm_t::num_kgrams, OPEN_VOCAB_1, prob_t, arpa_lm_t::probs, arpa_lm_t::ptr_table, arpa_lm_t::ptr_table_size, quit(), rr_calloc(), rr_feof(), rr_iclose(), rr_iopen(), rr_malloc(), salloc(), sih_add(), sih_create(), sih_lookup(), arpa_lm_t::table_sizes, arpa_lm_t::vocab, arpa_lm_t::vocab_ht, arpa_lm_t::vocab_size, arpa_lm_t::vocab_type, and arpa_lm_t::word_id.

Referenced by main().

void load_lm ng_t   ng,
char *    lm_filename
 

Definition at line 39 of file load_lm.c.

References ng_t::abs_disc_const, ABSOLUTE, ng_t::alpha_array, BBO_FILE_VERSION, ng_t::bin_fp, ng_t::bo_weight, ng_t::bo_weight4, bo_weight_t, ng_t::context_cue, ng_t::count, ng_t::count4, count_ind_t, count_t, ng_t::count_table, ng_t::count_table_size, cutoff_t, ng_t::cutoffs, ng_t::disc_range, disc_val_t, ng_t::discounting_method, ng_t::first_id, flag, ng_t::fof_size, ng_t::four_byte_alphas, ng_t::four_byte_counts, four_byte_t, ng_t::freq_of_freq, get_vocab_from_vocab_ht(), GOOD_TURING, ng_t::gt_disc_ratio, i, ng_t::ind, index__t, ng_t::lin_disc_ratio, LINEAR, ng_t::marg_counts, ng_t::marg_counts4, ng_t::max_alpha, ng_t::min_alpha, ng_t::n, ng_t::n_unigrams, ng_t::no_of_ccs, ng_t::num_kgrams, ng_t::oov_fraction, ng_t::out_of_range_alphas, ptr_tab_t, ng_t::ptr_table, ng_t::ptr_table_size, quit(), rr_calloc(), rr_fread(), rr_iclose(), rr_iopen(), rr_malloc(), salloc(), sih_val_read_from_file(), ng_t::size_of_alpha_array, ng_t::uni_log_probs, ng_t::uni_probs, uni_probs_t, ng_t::version, ng_t::vocab, ng_t::vocab_ht, ng_t::vocab_size, ng_t::vocab_type, WITTEN_BELL, ng_t::word_id, and ng_t::zeroton_fraction.

Referenced by main().


Generated on Tue Dec 21 13:54:47 2004 by doxygen1.2.18