Main Page   Compound List   File List   Compound Members   File Members  

bo_ng_prob.c File Reference

Return the probability of the (context_length+1)-gram stored in sought_ngram. More...

#include "pc_libs/pc_general.h"
#include "rr_libs/general.h"
#include "ngram.h"
#include "idngram2lm.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void bo_ng_prob (int context_length, id__t *sought_ngram, ng_t *ng, int verbosity, double *p_prob, int *bo_case)


Detailed Description

Return the probability of the (context_length+1)-gram stored in sought_ngram.

Definition in file bo_ng_prob.c.


Function Documentation

void bo_ng_prob int    context_length,
id__t   sought_ngram,
ng_t   ng,
int    verbosity,
double *    p_prob,
int *    bo_case
 

Definition at line 33 of file bo_ng_prob.c.

References ng_t::abs_disc_const, ABSOLUTE, ng_t::alpha_array, ng_t::bo_weight, ng_t::bo_weight4, ng_t::count, ng_t::count4, ng_t::count_table, ng_t::disc_range, ng_t::discounting_method, double_alpha(), flag, ng_t::four_byte_alphas, ng_t::four_byte_counts, fprintf(), free(), get_full_index(), GOOD_TURING, ng_t::gt_disc_ratio, i, ng_t::ind, ng_t::lin_disc_ratio, LINEAR, ng_t::marg_counts, ng_t::marg_counts4, ng_t::max_alpha, ng_t::min_alpha, ng_t::num_kgrams, num_of_types(), ng_t::out_of_range_alphas, pc_message(), ng_t::ptr_table, ng_t::ptr_table_size, return_count(), rr_malloc(), ng_t::size_of_alpha_array, ng_t::uni_probs, verbosity, ng_t::vocab_size, WITTEN_BELL, and ng_t::word_id.

Referenced by calc_prob_of(), and compute_back_off().


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