#include <PhraseDictionaryCompact.h>
Definition at line 46 of file PhraseDictionaryCompact.h.
typedef std::vector<TargetPhraseCollection::shared_ptr > Moses::PhraseDictionaryCompact::PhraseCache [protected] |
Definition at line 55 of file PhraseDictionaryCompact.h.
typedef boost::thread_specific_ptr<PhraseCache> Moses::PhraseDictionaryCompact::SentenceCache [protected] |
Definition at line 56 of file PhraseDictionaryCompact.h.
Moses::PhraseDictionaryCompact::PhraseDictionaryCompact | ( | const std::string & | line | ) |
Definition at line 49 of file PhraseDictionaryCompact.cpp.
References Moses::FeatureFunction::ReadParameters().
Moses::PhraseDictionaryCompact::~PhraseDictionaryCompact | ( | ) |
void Moses::PhraseDictionaryCompact::AddEquivPhrase | ( | const Phrase & | source, | |
const TargetPhrase & | targetPhrase | |||
) |
Definition at line 170 of file PhraseDictionaryCompact.cpp.
void Moses::PhraseDictionaryCompact::CacheForCleanup | ( | TargetPhraseCollection::shared_ptr | tpc | ) |
Definition at line 161 of file PhraseDictionaryCompact.cpp.
References m_sentenceCache.
Referenced by GetTargetPhraseCollectionNonCacheLEGACY().
void Moses::PhraseDictionaryCompact::CleanUpAfterSentenceProcessing | ( | const InputType & | source | ) | [virtual] |
Reimplemented from Moses::PhraseDictionary.
Definition at line 175 of file PhraseDictionaryCompact.cpp.
References m_phraseDecoder, m_sentenceCache, Moses::PhraseDecoder::PruneCache(), and Moses::PhraseDictionary::ReduceCache().
virtual ChartRuleLookupManager* Moses::PhraseDictionaryCompact::CreateRuleLookupManager | ( | const ChartParser & | , | |
const ChartCellCollectionBase & | , | |||
std::size_t | ||||
) | [inline, virtual] |
Create a sentence-specific manager for SCFG rule lookup.
Implements Moses::PhraseDictionary.
Definition at line 81 of file PhraseDictionaryCompact.h.
TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryCompact::GetTargetPhraseCollectionNonCacheLEGACY | ( | const Phrase & | source | ) | const [virtual] |
Reimplemented from Moses::PhraseDictionary.
Definition at line 102 of file PhraseDictionaryCompact.cpp.
References CacheForCleanup(), Moses::PhraseDecoder::CreateTargetPhraseCollection(), Moses::PhraseDecoder::GetMaxSourcePhraseLength(), Moses::Phrase::GetSize(), m_phraseDecoder, Moses::PhraseDictionary::m_tableLimit, NTH_ELEMENT4, and NULL.
TargetPhraseVectorPtr Moses::PhraseDictionaryCompact::GetTargetPhraseCollectionRaw | ( | const Phrase & | source | ) | const |
Definition at line 140 of file PhraseDictionaryCompact.cpp.
References Moses::PhraseDecoder::CreateTargetPhraseCollection(), Moses::PhraseDecoder::GetMaxSourcePhraseLength(), Moses::Phrase::GetSize(), and m_phraseDecoder.
void Moses::PhraseDictionaryCompact::Load | ( | AllOptions::ptr const & | opts | ) | [virtual] |
override to load model files
Reimplemented from Moses::FeatureFunction.
Definition at line 59 of file PhraseDictionaryCompact.cpp.
References Moses::FileExists(), Moses::StaticData::Instance(), Moses::StringVector< ValueT, PosT, Allocator >::load(), Moses::PhraseDecoder::Load(), Moses::BlockHashIndex::Load(), Moses::PhraseDictionary::m_filePath, m_hash, m_inMemory, Moses::DecodeFeature::m_input, Moses::FeatureFunction::m_numScoreComponents, Moses::FeatureFunction::m_options, Moses::DecodeFeature::m_output, m_phraseDecoder, m_targetPhrasesMapped, m_targetPhrasesMemory, PhraseDecoder, Moses::PhraseDictionary::SetFeaturesToApply(), and UTIL_THROW_IF2.
void Moses::PhraseDictionaryCompact::SetStaticDefaultParameters | ( | Parameter const & | param | ) | [static] |
Definition at line 189 of file PhraseDictionaryCompact.cpp.
References s_inMemoryByDefault, and Moses::Parameter::SetParameter().
Referenced by Moses::StaticData::LoadData().
Moses::PhraseDictionaryCompact::TO_STRING | ( | ) |
friend class PhraseDecoder [friend] |
BlockHashIndex Moses::PhraseDictionaryCompact::m_hash [protected] |
Definition at line 59 of file PhraseDictionaryCompact.h.
Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection(), and Load().
bool Moses::PhraseDictionaryCompact::m_inMemory [protected] |
Definition at line 52 of file PhraseDictionaryCompact.h.
Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection(), and Load().
Definition at line 60 of file PhraseDictionaryCompact.h.
Referenced by CleanUpAfterSentenceProcessing(), GetTargetPhraseCollectionNonCacheLEGACY(), GetTargetPhraseCollectionRaw(), Load(), and ~PhraseDictionaryCompact().
PhraseDictionaryCompact::SentenceCache Moses::PhraseDictionaryCompact::m_sentenceCache [static, protected] |
Definition at line 57 of file PhraseDictionaryCompact.h.
Referenced by CacheForCleanup(), and CleanUpAfterSentenceProcessing().
StringVector<unsigned char, size_t, MmapAllocator> Moses::PhraseDictionaryCompact::m_targetPhrasesMapped [protected] |
Definition at line 62 of file PhraseDictionaryCompact.h.
Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection(), and Load().
StringVector<unsigned char, size_t, std::allocator> Moses::PhraseDictionaryCompact::m_targetPhrasesMemory [protected] |
Definition at line 63 of file PhraseDictionaryCompact.h.
Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection(), and Load().
bool Moses::PhraseDictionaryCompact::m_useAlignmentInfo [protected] |
Definition at line 53 of file PhraseDictionaryCompact.h.
Referenced by Moses::PhraseDecoder::DecodeCollection().
bool Moses::PhraseDictionaryCompact::s_inMemoryByDefault = false [static, protected] |
Definition at line 51 of file PhraseDictionaryCompact.h.
Referenced by SetStaticDefaultParameters().