class LMCache

This class implements a rudimentary caching scheme for language model lookup.

Public Members

[more] Creates an empty cache
[more] 'max_entries_' is the maximum number of entries in the cache
[more] 'lm_order' is the order of the language model n-gram (ie 3
[more] for a trigram LM)
[more] Adds an entry to the cache.
[more] entry is not already in the cache, the oldest entry is
[more] overwritten
[more] 'order' is the order of the entry, which can be <= the lm_order
[more] used during cache creation
[more] 'words' are the words in the n-gram.
[more] for a 4-gram entry
[more] 'prob' is the log probability of the n-gram as calculated by the
[more] 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.

o Creates an empty cache
Creates an empty cache

o 'max_entries_' is the maximum number of entries in the cache
'max_entries_' is the maximum number of entries in the cache

o '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

o for a trigram LM)
for a trigram LM)

o Adds an entry to the cache.
Adds an entry to the cache. If the cache is full and the new

o entry is not already in the cache, the oldest entry is
entry is not already in the cache, the oldest entry is

o overwritten
overwritten

o '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

o used during cache creation
used during cache creation

o 'words' are the words in the n-gram.
'words' are the words in the n-gram. The order is W3 W2 W1 W4

o for a 4-gram entry
for a 4-gram entry

o '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

o 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++.