#include <TargetPhraseCollectionCache.h>
Classes | |
struct | LastUsed |
Public Types | |
typedef CacheMap::iterator | iterator |
typedef CacheMap::const_iterator | const_iterator |
Public Member Functions | |
TargetPhraseCollectionCache (size_t max=5000, float tolerance=0.2) | |
iterator | Begin () |
const_iterator | Begin () const |
iterator | End () |
const_iterator | End () const |
void | Cache (const Phrase &sourcePhrase, TargetPhraseVectorPtr tpv, size_t bitsLeft=0, size_t maxRank=0) |
std::pair < TargetPhraseVectorPtr, size_t > | Retrieve (const Phrase &sourcePhrase) |
void | Prune () |
void | CleanUp () |
Definition at line 43 of file TargetPhraseCollectionCache.h.
typedef CacheMap::const_iterator Moses::TargetPhraseCollectionCache::const_iterator |
Definition at line 66 of file TargetPhraseCollectionCache.h.
typedef CacheMap::iterator Moses::TargetPhraseCollectionCache::iterator |
Definition at line 65 of file TargetPhraseCollectionCache.h.
Moses::TargetPhraseCollectionCache::TargetPhraseCollectionCache | ( | size_t | max = 5000 , |
|
float | tolerance = 0.2 | |||
) | [inline] |
Definition at line 68 of file TargetPhraseCollectionCache.h.
const_iterator Moses::TargetPhraseCollectionCache::Begin | ( | ) | const [inline] |
Definition at line 78 of file TargetPhraseCollectionCache.h.
iterator Moses::TargetPhraseCollectionCache::Begin | ( | ) | [inline] |
Definition at line 72 of file TargetPhraseCollectionCache.h.
void Moses::TargetPhraseCollectionCache::Cache | ( | const Phrase & | sourcePhrase, | |
TargetPhraseVectorPtr | tpv, | |||
size_t | bitsLeft = 0 , |
|||
size_t | maxRank = 0 | |||
) | [inline] |
retrieve translations for source phrase from persistent cache
Definition at line 97 of file TargetPhraseCollectionCache.h.
Referenced by Moses::PhraseDecoder::DecodeCollection().
void Moses::TargetPhraseCollectionCache::CleanUp | ( | ) | [inline] |
Definition at line 153 of file TargetPhraseCollectionCache.h.
const_iterator Moses::TargetPhraseCollectionCache::End | ( | ) | const [inline] |
Definition at line 90 of file TargetPhraseCollectionCache.h.
iterator Moses::TargetPhraseCollectionCache::End | ( | ) | [inline] |
Definition at line 84 of file TargetPhraseCollectionCache.h.
void Moses::TargetPhraseCollectionCache::Prune | ( | ) | [inline] |
Definition at line 131 of file TargetPhraseCollectionCache.h.
Referenced by Moses::PhraseDecoder::PruneCache().
std::pair<TargetPhraseVectorPtr, size_t> Moses::TargetPhraseCollectionCache::Retrieve | ( | const Phrase & | sourcePhrase | ) | [inline] |
Definition at line 118 of file TargetPhraseCollectionCache.h.
Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection().