#include <PhraseDictionaryTreeAdaptor.h>
Public Member Functions | |
PhraseDictionaryTreeAdaptor (const std::string &line) | |
virtual | ~PhraseDictionaryTreeAdaptor () |
void | Load (AllOptions::ptr const &opts) |
override to load model files | |
void | EnableCache () |
void | DisableCache () |
TargetPhraseCollection::shared_ptr | GetTargetPhraseCollectionNonCacheLEGACY (Phrase const &src) const |
void | InitializeForInput (ttasksptr const &ttask) |
Create entry for translation of source to targetPhrase. | |
void | CleanUpAfterSentenceProcessing (InputType const &source) |
virtual ChartRuleLookupManager * | CreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t) |
Create a sentence-specific manager for SCFG rule lookup. | |
TargetPhraseCollectionWithSourcePhrase::shared_ptr | GetTargetPhraseCollectionLEGACY (InputType const &src, Range const &srcRange) const |
find list of translations that can translates a portion of src. Used by confusion network decoding | |
Friends | |
class | PDTAimp |
Definition at line 28 of file PhraseDictionaryTreeAdaptor.h.
Moses::PhraseDictionaryTreeAdaptor::PhraseDictionaryTreeAdaptor | ( | const std::string & | line | ) |
Definition at line 30 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::FeatureFunction::ReadParameters().
Moses::PhraseDictionaryTreeAdaptor::~PhraseDictionaryTreeAdaptor | ( | ) | [virtual] |
Definition at line 36 of file PhraseDictionaryTreeAdaptor.cpp.
void Moses::PhraseDictionaryTreeAdaptor::CleanUpAfterSentenceProcessing | ( | InputType const & | source | ) | [virtual] |
Reimplemented from Moses::PhraseDictionary.
Definition at line 72 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::PDTAimp::CleanUp().
virtual ChartRuleLookupManager* Moses::PhraseDictionaryTreeAdaptor::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 68 of file PhraseDictionaryTreeAdaptor.h.
References UTIL_THROW.
void Moses::PhraseDictionaryTreeAdaptor::DisableCache | ( | ) |
void Moses::PhraseDictionaryTreeAdaptor::EnableCache | ( | ) |
TargetPhraseCollectionWithSourcePhrase::shared_ptr Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollectionLEGACY | ( | InputType const & | src, | |
Range const & | range | |||
) | const [virtual] |
find list of translations that can translates a portion of src. Used by confusion network decoding
Reimplemented from Moses::PhraseDictionary.
Definition at line 112 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::Range::GetEndPos(), Moses::Range::GetStartPos(), Moses::InputType::GetSubString(), Moses::PDTAimp::GetTargetPhraseCollection(), and Moses::PDTAimp::m_rangeCache.
TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollectionNonCacheLEGACY | ( | Phrase const & | src | ) | const [virtual] |
Reimplemented from Moses::PhraseDictionary.
Definition at line 79 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::PDTAimp::GetTargetPhraseCollection().
void Moses::PhraseDictionaryTreeAdaptor::InitializeForInput | ( | ttasksptr const & | ttask | ) | [virtual] |
Create entry for translation of source to targetPhrase.
Reimplemented from Moses::PhraseDictionary.
Definition at line 46 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::PDTAimp::CacheSource(), Moses::PDTAimp::CleanUp(), Moses::PDTAimp::Create(), Moses::StaticData::GetWeights(), Moses::StaticData::Instance(), Moses::PhraseDictionary::m_filePath, Moses::DecodeFeature::m_input, Moses::FeatureFunction::m_numScoreComponents, Moses::DecodeFeature::m_output, PDTAimp, Moses::PhraseDictionary::ReduceCache(), and UTIL_THROW2.
void Moses::PhraseDictionaryTreeAdaptor::Load | ( | AllOptions::ptr const & | opts | ) | [virtual] |
override to load model files
Reimplemented from Moses::FeatureFunction.
Definition at line 40 of file PhraseDictionaryTreeAdaptor.cpp.
References Moses::FeatureFunction::m_options, and Moses::PhraseDictionary::SetFeaturesToApply().
Referenced by main().
friend class PDTAimp [friend] |