irstlm/src/lmtable.cpp File Reference

#include <stdio.h>
#include <cstdlib>
#include <stdlib.h>
#include <fcntl.h>
#include <iostream>
#include <fstream>
#include <stdexcept>
#include <string>
#include <set>
#include <cassert>
#include <limits>
#include "math.h"
#include "mempool.h"
#include "htable.h"
#include "ngramcache.h"
#include "dictionary.h"
#include "n_gram.h"
#include "lmtable.h"
#include "util.h"

Go to the source code of this file.

Defines

#define DEBUG   0
#define NOPROB   ((float)-1.329227995784915872903807060280344576e36)

Functions

void error (const char *message)
int parseWords (char *sentence, const char **words, int max)
int parseline (istream &inp, int Order, ngram &ng, float &prob, float &bow)


Define Documentation

#define DEBUG   0

Definition at line 43 of file lmtable.cpp.

#define NOPROB   ((float)-1.329227995784915872903807060280344576e36)

Definition at line 46 of file lmtable.cpp.

Referenced by lmtable::get(), lmtable::ngcnt(), lmtable::pscale(), and lmtable::wdprune().


Function Documentation

void error ( const char *  message  )  [inline]

Definition at line 50 of file lmtable.cpp.

int parseline ( istream &  inp,
int  Order,
ngram ng,
float &  prob,
float &  bow 
)

if (Order>1) { cout << prob << "\n"; for (int i=1;i<=Order;i++) cout << words[i] << " "; cout << "\n" << bow << "\n\n"; }

Definition at line 225 of file lmtable.cpp.

References ngram::dict, LMTMAXLEV, MAX_LINE, dictionary::OOV(), parseWords(), ngram::pushw(), and ngram::size.

Here is the call graph for this function:

int parseWords ( char *  sentence,
const char **  words,
int  max 
)

Definition at line 196 of file lmtable.cpp.

Referenced by lmmacro::loadLexicalClasses(), main(), and parseline().

Here is the caller graph for this function:


Generated on Fri Apr 15 13:04:15 2011 for Moses by  doxygen 1.5.9