#include <PDTAimp.h>

Classes | |
| struct | State |
| struct | TScores |
Public Types | |
| typedef std::vector < TargetPhraseCollection const * > | vTPC |
| typedef std::map< Phrase, TargetPhraseCollection const * > | MapSrc2Tgt |
| typedef PhraseDictionaryTree::PrefixPtr | PPtr |
| typedef unsigned short | Position |
| typedef std::pair< Position, Position > | Range |
Public Member Functions | |
| ~PDTAimp () | |
| void | Factors2String (Word const &w, std::string &s) const |
| void | CleanUp () |
| TargetPhraseCollection const * | GetTargetPhraseCollection (Phrase const &src) const |
| void | Create (const std::vector< FactorType > &input, const std::vector< FactorType > &output, const std::string &filePath, const std::vector< float > &weight, const LMList &languageModels, float weightWP) |
| void | CreateTargetPhrase (TargetPhrase &targetPhrase, StringTgtCand::first_type const &factorStrings, StringTgtCand::second_type const &scoreVector, const std::string &alignmentString, Phrase const *srcPtr=0) const |
| void | CreateTargetPhrase (TargetPhrase &targetPhrase, StringTgtCand::first_type const &factorStrings, StringTgtCand::second_type const &scoreVector, Phrase const *srcPtr=0) const |
| TargetPhraseCollection * | PruneTargetCandidates (std::vector< TargetPhrase > const &tCands, std::vector< std::pair< float, size_t > > &costs) const |
| void | CacheSource (ConfusionNet const &src) |
| size_t | GetNumInputScores () const |
Public Attributes | |
| std::vector< float > | m_weights |
| LMList const * | m_languageModels |
| float | m_weightWP |
| std::vector< FactorType > | m_input |
| std::vector< FactorType > | m_output |
| PhraseDictionaryTree * | m_dict |
| vTPC | m_tgtColls |
| MapSrc2Tgt | m_cache |
| PhraseDictionaryTreeAdaptor * | m_obj |
| int | useCache |
| std::vector< vTPC > | m_rangeCache |
| unsigned | m_numInputScores |
| UniqueObjectManager< Phrase > | uniqSrcPhr |
| size_t | totalE |
| size_t | distinctE |
| std::vector< size_t > | path1Best |
| std::vector< size_t > | pathExplored |
| std::vector< double > | pathCN |
Protected Member Functions | |
| PDTAimp (PhraseDictionaryTreeAdaptor *p, unsigned nis) | |
Friends | |
| class | PhraseDictionaryTreeAdaptor |
Definition at line 28 of file PDTAimp.h.
| typedef std::map<Phrase,TargetPhraseCollection const*> Moses::PDTAimp::MapSrc2Tgt |
| typedef unsigned short Moses::PDTAimp::Position |
| typedef std::pair<Position,Position> Moses::PDTAimp::Range |
| typedef std::vector<TargetPhraseCollection const*> Moses::PDTAimp::vTPC |
| Moses::PDTAimp::PDTAimp | ( | PhraseDictionaryTreeAdaptor * | p, | |
| unsigned | nis | |||
| ) | [inline, protected] |
| Moses::PDTAimp::~PDTAimp | ( | ) | [inline] |
Definition at line 61 of file PDTAimp.h.
References CleanUp(), distinctE, Moses::Exp(), Moses::StaticData::Instance(), m_dict, path1Best, pathCN, pathExplored, totalE, and TRACE_ERR.

| void Moses::PDTAimp::CacheSource | ( | ConfusionNet const & | src | ) | [inline] |
Definition at line 315 of file PDTAimp.h.
References Moses::addLogScale(), Moses::Phrase::AddWord(), CHECK, CreateTargetPhrase(), distinctE, EPSILON, Moses::Exp(), Moses::PhraseDictionaryTree::Extend(), Factors2String(), Moses::PhraseDictionaryTree::FreeMemory(), Moses::ConfusionNet::GetColumnIncrement(), Moses::TargetPhrase::GetFutureScore(), Moses::PhraseDictionaryTree::GetRoot(), Moses::ConfusionNet::GetSize(), Moses::PhraseDictionaryTree::GetTargetCandidates(), Moses::StaticData::Instance(), Moses::TargetPhraseCollection::IsEmpty(), Moses::LOWEST_SCORE, m_dict, m_numInputScores, m_rangeCache, m_tgtColls, m_weights, m_weightWP, Moses::Output, path1Best, pathCN, pathExplored, PruneTargetCandidates(), Moses::PDTAimp::TScores::src, Moses::PDTAimp::TScores::total, totalE, TRACE_ERR, Moses::PDTAimp::TScores::trans, Moses::TransformScore(), and uniqSrcPhr.
Referenced by Moses::PhraseDictionaryTreeAdaptor::InitializeForInput().


| void Moses::PDTAimp::CleanUp | ( | ) | [inline] |
Definition at line 102 of file PDTAimp.h.
References CHECK, UniqueObjectManager< T >::clear(), Moses::PhraseDictionaryTree::FreeMemory(), m_cache, m_dict, m_rangeCache, m_tgtColls, and uniqSrcPhr.
Referenced by Moses::PhraseDictionaryTreeAdaptor::InitializeForInput(), ~PDTAimp(), and Moses::PhraseDictionaryTreeAdaptor::~PhraseDictionaryTreeAdaptor().


| void Moses::PDTAimp::Create | ( | const std::vector< FactorType > & | input, | |
| const std::vector< FactorType > & | output, | |||
| const std::string & | filePath, | |||
| const std::vector< float > & | weight, | |||
| const LMList & | languageModels, | |||
| float | weightWP | |||
| ) | [inline] |
Definition at line 179 of file PDTAimp.h.
References Moses::UserMessage::Add(), Moses::FileExists(), Moses::StaticData::Instance(), m_dict, m_input, m_languageModels, m_numInputScores, m_output, m_weights, m_weightWP, Moses::PhraseDictionaryTree::Read(), TRACE_ERR, Moses::StaticData::UseAlignmentInfo(), and Moses::PhraseDictionaryTree::UseWordAlignment().
Referenced by Moses::PhraseDictionaryTreeAdaptor::Load().


| void Moses::PDTAimp::CreateTargetPhrase | ( | TargetPhrase & | targetPhrase, | |
| StringTgtCand::first_type const & | factorStrings, | |||
| StringTgtCand::second_type const & | scoreVector, | |||
| Phrase const * | srcPtr = 0 | |||
| ) | const [inline] |
Definition at line 263 of file PDTAimp.h.
References Moses::FactorCollection::AddFactor(), Moses::Phrase::AddWord(), CHECK, Moses::PhraseDictionary::GetFeature(), Moses::StaticData::Instance(), Moses::FactorCollection::Instance(), m_languageModels, m_obj, m_output, m_weights, m_weightWP, Moses::Output, Moses::TargetPhrase::SetScore(), Moses::TargetPhrase::SetSourcePhrase(), and Moses::TokenizeMultiCharSeparator().

| void Moses::PDTAimp::CreateTargetPhrase | ( | TargetPhrase & | targetPhrase, | |
| StringTgtCand::first_type const & | factorStrings, | |||
| StringTgtCand::second_type const & | scoreVector, | |||
| const std::string & | alignmentString, | |||
| Phrase const * | srcPtr = 0 | |||
| ) | const [inline] |
Definition at line 253 of file PDTAimp.h.
References Moses::TargetPhrase::SetAlignmentInfo().
Referenced by CacheSource(), and GetTargetPhraseCollection().


| void Moses::PDTAimp::Factors2String | ( | Word const & | w, | |
| std::string & | s | |||
| ) | const [inline] |
Definition at line 98 of file PDTAimp.h.
References Moses::Word::GetString(), and m_input.
Referenced by CacheSource(), and GetTargetPhraseCollection().


| size_t Moses::PDTAimp::GetNumInputScores | ( | ) | const [inline] |
Definition at line 508 of file PDTAimp.h.
References m_numInputScores.
Referenced by Moses::PhraseDictionaryTreeAdaptor::GetNumInputScores().

| TargetPhraseCollection const* Moses::PDTAimp::GetTargetPhraseCollection | ( | Phrase const & | src | ) | const [inline] |
Definition at line 113 of file PDTAimp.h.
References CHECK, CreateTargetPhrase(), Factors2String(), Moses::FloorScore(), Moses::TargetPhrase::GetFutureScore(), Moses::Phrase::GetSize(), Moses::PhraseDictionaryTree::GetTargetCandidates(), Moses::Phrase::GetWord(), Moses::TargetPhraseCollection::IsEmpty(), m_cache, m_dict, m_tgtColls, Moses::Output, PruneTargetCandidates(), Moses::TransformScore(), and useCache.
Referenced by Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollection().


| TargetPhraseCollection* Moses::PDTAimp::PruneTargetCandidates | ( | std::vector< TargetPhrase > const & | tCands, | |
| std::vector< std::pair< float, size_t > > & | costs | |||
| ) | const [inline] |
Definition at line 284 of file PDTAimp.h.
References Moses::TargetPhraseCollection::Add(), Moses::TargetPhraseCollection::begin(), m_obj, and Moses::PhraseDictionary::m_tableLimit.
Referenced by CacheSource(), and GetTargetPhraseCollection().


friend class PhraseDictionaryTreeAdaptor [friend] |
| size_t Moses::PDTAimp::distinctE |
MapSrc2Tgt Moses::PDTAimp::m_cache [mutable] |
Definition at line 43 of file PDTAimp.h.
Referenced by CacheSource(), CleanUp(), Create(), GetTargetPhraseCollection(), and ~PDTAimp().
| std::vector<FactorType> Moses::PDTAimp::m_input |
| unsigned Moses::PDTAimp::m_numInputScores |
Definition at line 53 of file PDTAimp.h.
Referenced by CacheSource(), Create(), and GetNumInputScores().
Definition at line 49 of file PDTAimp.h.
Referenced by CreateTargetPhrase(), and PruneTargetCandidates().
| std::vector<FactorType> Moses::PDTAimp::m_output |
| std::vector<vTPC> Moses::PDTAimp::m_rangeCache |
Definition at line 52 of file PDTAimp.h.
Referenced by CacheSource(), CleanUp(), and Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollection().
vTPC Moses::PDTAimp::m_tgtColls [mutable] |
Definition at line 45 of file PDTAimp.h.
Referenced by CacheSource(), CleanUp(), and GetTargetPhraseCollection().
| std::vector<float> Moses::PDTAimp::m_weights |
Definition at line 39 of file PDTAimp.h.
Referenced by CacheSource(), Create(), and CreateTargetPhrase().
Definition at line 41 of file PDTAimp.h.
Referenced by CacheSource(), Create(), and CreateTargetPhrase().
| std::vector<size_t> Moses::PDTAimp::path1Best |
| std::vector<double> Moses::PDTAimp::pathCN |
| std::vector<size_t> Moses::PDTAimp::pathExplored |
| size_t Moses::PDTAimp::totalE |
Definition at line 50 of file PDTAimp.h.
Referenced by Moses::PhraseDictionaryTreeAdaptor::DisableCache(), Moses::PhraseDictionaryTreeAdaptor::EnableCache(), and GetTargetPhraseCollection().
1.5.9