NGram Struct Reference

A parsed n-gram from ARPA LM file. More...

#include <arpa-file-parser.h>

Collaboration diagram for NGram:

Public Member Functions

 NGram ()
 

Public Attributes

std::vector< int32words
 Symbols in left to right order. More...
 
float logprob
 Log-prob of the n-gram. More...
 
float backoff
 log-backoff weight of the n-gram. More...
 

Detailed Description

A parsed n-gram from ARPA LM file.

Definition at line 68 of file arpa-file-parser.h.

Constructor & Destructor Documentation

◆ NGram()

NGram ( )
inline

Definition at line 69 of file arpa-file-parser.h.

69 : logprob(0.0), backoff(0.0) { }
float logprob
Log-prob of the n-gram.
float backoff
log-backoff weight of the n-gram.

Member Data Documentation

◆ backoff

float backoff

log-backoff weight of the n-gram.

Defaults to zero if not specified.

Definition at line 72 of file arpa-file-parser.h.

Referenced by ArpaLmCompilerImpl< HistKey >::ConsumeNGram(), ConstArpaLmBuilder::ConsumeNGram(), and ArpaFileParser::Read().

◆ logprob

float logprob

◆ words

std::vector<int32> words

The documentation for this struct was generated from the following file: