class LMNGram

This class is the main class for N-gram language modelling.

Public Fields

[more]int n
The order of the N-Gram
[more]real* unigrams
The unigram probability entries, 1 for every vocab word
[more]LMInteriorLevelWordList* next_level
Points to the start of the language model tree structure
[more]LMCache* cache
The cache used for fast LM lookup

Public Methods

[more] LMNGram( int n_, Vocabulary* vocab_ )
Creates an empty N-Gram data structure.

Public Members

[more] Adds a new entry to the N-gram
[more] 'order' is the order of the entry (ie.
[more] The 'words' array needs to be in oldest-word-first order
[more] ([w1 w2 w3] for trigram entry)
[more] 'prob' is the log probability for the entry
[more] 'bo_wt' is the log back-off weight for the entry.
[more] Finds the N-gram probability of a given word sequence, with full
[more] backoff
[more] 'order' is the number of words in the 'words' array
[more] The ordering in 'words' is W3,W2,W1,W4 for a 4-gram query


Documentation

This class is the main class for N-gram language modelling. After language model entries have been added, lookups with full backoff can be performed.

oint n
The order of the N-Gram

oreal* unigrams
The unigram probability entries, 1 for every vocab word

oLMInteriorLevelWordList* next_level
Points to the start of the language model tree structure

oLMCache* cache
The cache used for fast LM lookup

o LMNGram( int n_, Vocabulary* vocab_ )
Creates an empty N-Gram data structure. 'n_' is the N-gram order.

o Adds a new entry to the N-gram
Adds a new entry to the N-gram

o 'order' is the order of the entry (ie.
'order' is the order of the entry (ie. 2 for a bigram entry).

o The 'words' array needs to be in oldest-word-first order
The 'words' array needs to be in oldest-word-first order

o ([w1 w2 w3] for trigram entry)
([w1 w2 w3] for trigram entry)

o 'prob' is the log probability for the entry
'prob' is the log probability for the entry

o 'bo_wt' is the log back-off weight for the entry.
'bo_wt' is the log back-off weight for the entry. If order is

o Finds the N-gram probability of a given word sequence, with full
Finds the N-gram probability of a given word sequence, with full

o backoff
backoff

o 'order' is the number of words in the 'words' array
'order' is the number of words in the 'words' array

o The ordering in 'words' is W3,W2,W1,W4 for a 4-gram query
The ordering in 'words' is W3,W2,W1,W4 for a 4-gram query


This class has no child classes.
Author:
Darren Moore (moore@idiap.ch)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.