This class implements a rudimentary caching scheme for language model lookup.
Public Members
-
Creates an empty cache
-
'max_entries_' is the maximum number of entries in the cache
-
'lm_order' is the order of the language model n-gram (ie 3
-
for a trigram LM)
-
Adds an entry to the cache.
-
entry is not already in the cache, the oldest entry is
-
overwritten
-
'order' is the order of the entry, which can be <= the lm_order
-
used during cache creation
-
'words' are the words in the n-gram.
-
for a 4-gram entry
-
'prob' is the log probability of the n-gram as calculated by the
-
Looks for the n-gram in 'words' within the cache and returns
Documentation
This class implements a rudimentary caching scheme for language
model lookup. It basically consists of a (small) list of the most
recently accessed language model entries. A cache lookup entails
a linear search of the list of entries. The oldest entry is
overwritten when the cache is full and a new entry is added.
- Creates an empty cache
- Creates an empty cache
- 'max_entries_' is the maximum number of entries in the cache
- 'max_entries_' is the maximum number of entries in the cache
- 'lm_order' is the order of the language model n-gram (ie 3
- 'lm_order' is the order of the language model n-gram (ie 3
- for a trigram LM)
- for a trigram LM)
- Adds an entry to the cache.
- Adds an entry to the cache. If the cache is full and the new
- entry is not already in the cache, the oldest entry is
- entry is not already in the cache, the oldest entry is
- overwritten
- overwritten
- 'order' is the order of the entry, which can be <= the lm_order
- 'order' is the order of the entry, which can be <= the lm_order
- used during cache creation
- used during cache creation
- 'words' are the words in the n-gram.
- 'words' are the words in the n-gram. The order is W3 W2 W1 W4
- for a 4-gram entry
- for a 4-gram entry
- 'prob' is the log probability of the n-gram as calculated by the
- 'prob' is the log probability of the n-gram as calculated by the
- Looks for the n-gram in 'words' within the cache and returns
- Looks for the n-gram in 'words' within the cache and returns
- 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++.