Moses::PhraseDictionaryMultiModelCounts Class Reference

#include <PhraseDictionaryMultiModelCounts.h>

Inheritance diagram for Moses::PhraseDictionaryMultiModelCounts:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionaryMultiModelCounts (const std::string &line)
 ~PhraseDictionaryMultiModelCounts ()
void Load (AllOptions::ptr const &opts)
 override to load model files
TargetPhraseCollection::shared_ptr CreateTargetPhraseCollectionCounts (const Phrase &src, std::vector< float > &fs, std::map< std::string, multiModelCountsStats * > *allStats, std::vector< std::vector< float > > &multimodelweights) const
void CollectSufficientStats (const Phrase &src, std::vector< float > &fs, std::map< std::string, multiModelCountsStats * > *allStats) const
float GetTargetCount (const Phrase &target, size_t modelIndex) const
double GetLexicalProbability (Word &inner, Word &outer, const std::vector< lexicalTable * > &tables, std::vector< float > &multimodelweights) const
double ComputeWeightedLexicalTranslation (const Phrase &phraseS, const Phrase &phraseT, AlignVector &alignment, const std::vector< lexicalTable * > &tables, std::vector< float > &multimodelweights, bool is_input) const
double ComputeWeightedLexicalTranslationFromCache (std::vector< std::vector< std::pair< std::vector< float >, std::vector< float > > > > &cache, std::vector< float > &weights) const
std::pair
< PhraseDictionaryMultiModelCounts::AlignVector,
PhraseDictionaryMultiModelCounts::AlignVector > 
GetAlignmentsForLexWeights (const Phrase &phraseS, const Phrase &phraseT, const AlignmentInfo &alignment) const
std::vector< std::vector
< std::pair< std::vector
< float >, std::vector< float > > > > 
CacheLexicalStats (const Phrase &phraseS, const Phrase &phraseT, AlignVector &alignment, const std::vector< lexicalTable * > &tables, bool is_input)
void FillLexicalCountsJoint (Word &wordS, Word &wordT, std::vector< float > &count, const std::vector< lexicalTable * > &tables) const
void FillLexicalCountsMarginal (Word &wordS, std::vector< float > &count, const std::vector< lexicalTable * > &tables) const
void LoadLexicalTable (std::string &fileName, lexicalTable *ltable)
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionLEGACY (const Phrase &src) const
 find list of translations that can translates src. Only for phrase input
virtual void InitializeForInput (ttasksptr const &ttask)
 Create entry for translation of source to targetPhrase.
void SetParameter (const std::string &key, const std::string &value)


Detailed Description

Implementation of a phrase table with raw counts.

Definition at line 69 of file PhraseDictionaryMultiModelCounts.h.


Constructor & Destructor Documentation

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

Moses::PhraseDictionaryMultiModelCounts::~PhraseDictionaryMultiModelCounts (  ) 

Definition at line 79 of file PhraseDictionaryMultiModelCounts.cpp.

References Moses::RemoveAllInColl().

Here is the call graph for this function:


Member Function Documentation

std::vector<std::vector<std::pair<std::vector<float>, std::vector<float> > > > Moses::PhraseDictionaryMultiModelCounts::CacheLexicalStats ( const Phrase phraseS,
const Phrase phraseT,
AlignVector &  alignment,
const std::vector< lexicalTable * > &  tables,
bool  is_input 
)

void Moses::PhraseDictionaryMultiModelCounts::CollectSufficientStats ( const Phrase src,
std::vector< float > &  fs,
std::map< std::string, multiModelCountsStats * > *  allStats 
) const

Referenced by GetTargetPhraseCollectionLEGACY().

Here is the caller graph for this function:

double Moses::PhraseDictionaryMultiModelCounts::ComputeWeightedLexicalTranslation ( const Phrase phraseS,
const Phrase phraseT,
AlignVector &  alignment,
const std::vector< lexicalTable * > &  tables,
std::vector< float > &  multimodelweights,
bool  is_input 
) const

double Moses::PhraseDictionaryMultiModelCounts::ComputeWeightedLexicalTranslationFromCache ( std::vector< std::vector< std::pair< std::vector< float >, std::vector< float > > > > &  cache,
std::vector< float > &  weights 
) const

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryMultiModelCounts::CreateTargetPhraseCollectionCounts ( const Phrase src,
std::vector< float > &  fs,
std::map< std::string, multiModelCountsStats * > *  allStats,
std::vector< std::vector< float > > &  multimodelweights 
) const

Referenced by GetTargetPhraseCollectionLEGACY().

Here is the caller graph for this function:

void Moses::PhraseDictionaryMultiModelCounts::FillLexicalCountsJoint ( Word wordS,
Word wordT,
std::vector< float > &  count,
const std::vector< lexicalTable * > &  tables 
) const

void Moses::PhraseDictionaryMultiModelCounts::FillLexicalCountsMarginal ( Word wordS,
std::vector< float > &  count,
const std::vector< lexicalTable * > &  tables 
) const

pair< PhraseDictionaryMultiModelCounts::AlignVector, PhraseDictionaryMultiModelCounts::AlignVector > Moses::PhraseDictionaryMultiModelCounts::GetAlignmentsForLexWeights ( const Phrase phraseS,
const Phrase phraseT,
const AlignmentInfo alignment 
) const

Definition at line 272 of file PhraseDictionaryMultiModelCounts.cpp.

References Moses::AlignmentInfo::begin(), Moses::AlignmentInfo::end(), and Moses::Phrase::GetSize().

Here is the call graph for this function:

double Moses::PhraseDictionaryMultiModelCounts::GetLexicalProbability ( Word inner,
Word outer,
const std::vector< lexicalTable * > &  tables,
std::vector< float > &  multimodelweights 
) const

float Moses::PhraseDictionaryMultiModelCounts::GetTargetCount ( const Phrase target,
size_t  modelIndex 
) const

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryMultiModelCounts::GetTargetPhraseCollectionLEGACY ( const Phrase src  )  const [virtual]

virtual void Moses::PhraseDictionaryMultiModelCounts::InitializeForInput ( ttasksptr const &  ttask  )  [inline, virtual]

Create entry for translation of source to targetPhrase.

Reimplemented from Moses::PhraseDictionaryMultiModel.

Definition at line 99 of file PhraseDictionaryMultiModelCounts.h.

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

void Moses::PhraseDictionaryMultiModelCounts::LoadLexicalTable ( std::string &  fileName,
lexicalTable ltable 
)

Referenced by Load().

Here is the caller graph for this function:

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


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

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