This class is the main class for N-gram language modelling.
Public Fields
-
int n
- The order of the N-Gram
-
real* unigrams
- The unigram probability entries, 1 for every vocab word
-
LMInteriorLevelWordList* next_level
- Points to the start of the language model tree structure
-
LMCache* cache
- The cache used for fast LM lookup
Public Methods
-
LMNGram( int n_, Vocabulary* vocab_ )
- Creates an empty N-Gram data structure.
Public Members
-
Adds a new entry to the N-gram
-
'order' is the order of the entry (ie.
-
The 'words' array needs to be in oldest-word-first order
-
([w1 w2 w3] for trigram entry)
-
'prob' is the log probability for the entry
-
'bo_wt' is the log back-off weight for the entry.
-
Finds the N-gram probability of a given word sequence, with full
-
backoff
-
'order' is the number of words in the 'words' array
-
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.
- int n
- The order of the N-Gram
- real* unigrams
- The unigram probability entries, 1 for every vocab word
- LMInteriorLevelWordList* next_level
- Points to the start of the language model tree structure
- LMCache* cache
- The cache used for fast LM lookup
- LMNGram( int n_, Vocabulary* vocab_ )
- Creates an empty N-Gram data structure. 'n_' is the N-gram order.
- Adds a new entry to the N-gram
- Adds a new entry to the N-gram
- 'order' is the order of the entry (ie.
- 'order' is the order of the entry (ie. 2 for a bigram entry).
- The 'words' array needs to be in oldest-word-first order
- The 'words' array needs to be in oldest-word-first order
- ([w1 w2 w3] for trigram entry)
- ([w1 w2 w3] for trigram entry)
- 'prob' is the log probability for the entry
- 'prob' is the log probability for the entry
- '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
- Finds the N-gram probability of a given word sequence, with full
- Finds the N-gram probability of a given word sequence, with full
- backoff
- backoff
- 'order' is the number of words in the 'words' array
- 'order' is the number of words in the 'words' array
- 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++.