Moses::ProbingPT Class Reference

#include <ProbingPT.h>

Inheritance diagram for Moses::ProbingPT:

Inheritance graph
[legend]
Collaboration diagram for Moses::ProbingPT:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ProbingPT (const std::string &line)
 ~ProbingPT ()
void Load (AllOptions::ptr const &opts)
 override to load model files
void InitializeForInput (ttasksptr const &ttask)
 Create entry for translation of source to targetPhrase.
void SetParameter (const std::string &key, const std::string &value)
void GetTargetPhraseCollectionBatch (const InputPathList &inputPathQueue) const
virtual ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
 TO_STRING ()

Protected Types

typedef boost::unordered_map
< uint64_t,
TargetPhraseCollection * > 
CachePb

Protected Member Functions

void CreateAlignmentMap (const std::string path)
TargetPhraseCollection::shared_ptr CreateTargetPhrase (const Phrase &sourcePhrase) const
std::pair< bool, uint64_t > GetKey (const Phrase &sourcePhrase) const
void GetSourceProbingIds (const Phrase &sourcePhrase, bool &ok, uint64_t probingSource[]) const
uint64_t GetSourceProbingId (const Word &word) const
uint64_t GetSourceProbingId (const Factor *factor) const
TargetPhraseCollectionCreateTargetPhrases (const Phrase &sourcePhrase, uint64_t key) const
TargetPhraseCreateTargetPhrase (const char *&offset) const
const FactorGetTargetFactor (uint32_t probingId) const

Protected Attributes

probingpt::QueryEngine * m_engine
uint64_t m_unkId
std::vector< uint64_t > m_sourceVocab
std::vector< const Factor * > m_targetVocab
std::vector< const
AlignmentInfo * > 
m_aligns
util::LoadMethod load_method
boost::iostreams::mapped_file_source file
const char * data
CachePb m_cachePb

Friends

std::ostream & operator<< (std::ostream &, const ProbingPT &)


Detailed Description

Definition at line 21 of file ProbingPT.h.


Member Typedef Documentation

typedef boost::unordered_map<uint64_t, TargetPhraseCollection*> Moses::ProbingPT::CachePb [protected]

Definition at line 60 of file ProbingPT.h.


Constructor & Destructor Documentation

Moses::ProbingPT::ProbingPT ( const std::string &  line  ) 

Definition at line 14 of file ProbingPT.cpp.

References Moses::DecodeFeature::m_input, Moses::DecodeFeature::m_output, and Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::ProbingPT::~ProbingPT (  ) 

Definition at line 25 of file ProbingPT.cpp.

References m_engine.


Member Function Documentation

void Moses::ProbingPT::CreateAlignmentMap ( const std::string  path  )  [protected]

Definition at line 98 of file ProbingPT.cpp.

References Moses::AlignmentInfoCollection::Instance(), m_aligns, m_engine, and NULL.

Referenced by Load().

Here is the call graph for this function:

Here is the caller graph for this function:

ChartRuleLookupManager * Moses::ProbingPT::CreateRuleLookupManager ( const ChartParser ,
const ChartCellCollectionBase ,
std::size_t   
) [virtual]

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

Definition at line 356 of file ProbingPT.cpp.

References NULL.

TargetPhrase * Moses::ProbingPT::CreateTargetPhrase ( const char *&  offset  )  const [protected]

TargetPhraseCollection::shared_ptr Moses::ProbingPT::CreateTargetPhrase ( const Phrase sourcePhrase  )  const [protected]

Definition at line 163 of file ProbingPT.cpp.

References CreateTargetPhrases(), GetKey(), Moses::Phrase::GetSize(), and m_cachePb.

Referenced by CreateTargetPhrases(), and GetTargetPhraseCollectionBatch().

Here is the call graph for this function:

Here is the caller graph for this function:

TargetPhraseCollection * Moses::ProbingPT::CreateTargetPhrases ( const Phrase sourcePhrase,
uint64_t  key 
) const [protected]

std::pair< bool, uint64_t > Moses::ProbingPT::GetKey ( const Phrase sourcePhrase  )  const [protected]

Definition at line 187 of file ProbingPT.cpp.

References Moses::Phrase::GetSize(), GetSourceProbingIds(), and m_engine.

Referenced by CreateTargetPhrase().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t Moses::ProbingPT::GetSourceProbingId ( const Factor factor  )  const [protected]

uint64_t Moses::ProbingPT::GetSourceProbingId ( const Word word  )  const [protected]

Definition at line 227 of file ProbingPT.cpp.

References Moses::Factor::GetId(), Moses::DecodeFeature::m_input, m_sourceVocab, and m_unkId.

Referenced by GetSourceProbingIds().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ProbingPT::GetSourceProbingIds ( const Phrase sourcePhrase,
bool &  ok,
uint64_t  probingSource[] 
) const [protected]

Definition at line 208 of file ProbingPT.cpp.

References Moses::Phrase::GetSize(), GetSourceProbingId(), Moses::Phrase::GetWord(), and m_unkId.

Referenced by GetKey().

Here is the call graph for this function:

Here is the caller graph for this function:

const Factor* Moses::ProbingPT::GetTargetFactor ( uint32_t  probingId  )  const [inline, protected]

Definition at line 78 of file ProbingPT.h.

References m_targetVocab, and NULL.

Referenced by CreateTargetPhrase().

Here is the caller graph for this function:

void Moses::ProbingPT::GetTargetPhraseCollectionBatch ( const InputPathList inputPathQueue  )  const [virtual]

void Moses::ProbingPT::InitializeForInput ( ttasksptr const &  ttask  )  [virtual]

Create entry for translation of source to targetPhrase.

Reimplemented from Moses::PhraseDictionary.

Definition at line 142 of file ProbingPT.cpp.

void Moses::ProbingPT::Load ( AllOptions::ptr const &  opts  )  [virtual]

void Moses::ProbingPT::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]

Moses::ProbingPT::TO_STRING (  ) 


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const ProbingPT  
) [friend]


Member Data Documentation

const char* Moses::ProbingPT::data [protected]

Definition at line 57 of file ProbingPT.h.

Referenced by CreateTargetPhrases(), and Load().

boost::iostreams::mapped_file_source Moses::ProbingPT::file [protected]

Definition at line 56 of file ProbingPT.h.

Referenced by Load().

Definition at line 54 of file ProbingPT.h.

Referenced by Load(), and SetParameter().

std::vector<const AlignmentInfo*> Moses::ProbingPT::m_aligns [protected]

Definition at line 53 of file ProbingPT.h.

Referenced by CreateAlignmentMap(), and CreateTargetPhrase().

Definition at line 61 of file ProbingPT.h.

Referenced by CreateTargetPhrase().

probingpt::QueryEngine* Moses::ProbingPT::m_engine [protected]

std::vector<uint64_t> Moses::ProbingPT::m_sourceVocab [protected]

Definition at line 51 of file ProbingPT.h.

Referenced by GetSourceProbingId(), and Load().

std::vector<const Factor*> Moses::ProbingPT::m_targetVocab [protected]

Definition at line 52 of file ProbingPT.h.

Referenced by GetTargetFactor(), and Load().

uint64_t Moses::ProbingPT::m_unkId [protected]

Definition at line 49 of file ProbingPT.h.

Referenced by GetSourceProbingId(), GetSourceProbingIds(), and Load().


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:53 2017 for Moses by  doxygen 1.5.9