Moses::TargetPhrase Class Reference

#include <TargetPhrase.h>

Inheritance diagram for Moses::TargetPhrase:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TargetPhrase ()
 TargetPhrase (std::string out_string)
 TargetPhrase (const Phrase &)
 ~TargetPhrase ()
void SetScore (const TranslationSystem *system)
void SetScore (float score)
 Set score for Sentence XML target options.
void SetScore (const TranslationSystem *system, const Scores &scoreVector)
 Set score for unknown words with input weights.
void SetScore (const ScoreProducer *translationScoreProducer, const Scores &scoreVector, const std::vector< float > &weightT, float weightWP, const LMList &languageModels)
void SetScoreChart (const ScoreProducer *translationScoreProducer, const Scores &scoreVector, const std::vector< float > &weightT, const LMList &languageModels, const WordPenaltyProducer *wpProducer)
void SetScore (const ScoreProducer *producer, const Scores &scoreVector)
void ResetScore ()
void SetWeights (const ScoreProducer *, const std::vector< float > &weightT)
TargetPhraseMergeNext (const TargetPhrase &targetPhrase) const
float GetFutureScore () const
const ScoreComponentCollectionGetScoreBreakdown () const
void SetSourcePhrase (Phrase const *p)
 TODO - why is this needed and is it set correctly by every phrase dictionary class ? should be set in constructor.
Phrase const * GetSourcePhrase () const
void SetTargetLHS (const Word &lhs)
const WordGetTargetLHS () const
void SetAlignmentInfo (const StringPiece &alignString)
void SetAlignmentInfo (const std::set< std::pair< size_t, size_t > > &alignmentInfo)
void SetAlignmentInfo (const AlignmentInfo *alignmentInfo)
const AlignmentInfoGetAlignmentInfo () const
 TO_STRING ()

Protected Attributes

float m_transScore
float m_fullScore
ScoreComponentCollection m_scoreBreakdown
const AlignmentInfom_alignmentInfo
Phrase const * m_sourcePhrase
Word m_lhsTarget

Friends

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


Detailed Description

represents an entry on the target side of a phrase table (scores, translation, alignment)

Definition at line 47 of file TargetPhrase.h.


Constructor & Destructor Documentation

Moses::TargetPhrase::TargetPhrase (  ) 

Definition at line 54 of file TargetPhrase.cpp.

Referenced by MergeNext().

Here is the caller graph for this function:

Moses::TargetPhrase::TargetPhrase ( std::string  out_string  ) 

Moses::TargetPhrase::TargetPhrase ( const Phrase phrase  ) 

Definition at line 63 of file TargetPhrase.cpp.

Moses::TargetPhrase::~TargetPhrase (  ) 

Definition at line 72 of file TargetPhrase.cpp.


Member Function Documentation

const AlignmentInfo& Moses::TargetPhrase::GetAlignmentInfo (  )  const [inline]

float Moses::TargetPhrase::GetFutureScore (  )  const [inline]

const ScoreComponentCollection& Moses::TargetPhrase::GetScoreBreakdown (  )  const [inline]

Definition at line 128 of file TargetPhrase.h.

References m_scoreBreakdown.

Referenced by Moses::ChartHypothesis::CalcScore(), and Moses::TranslationOption::TranslationOption().

Here is the caller graph for this function:

Phrase const* Moses::TargetPhrase::GetSourcePhrase (  )  const [inline]

Definition at line 136 of file TargetPhrase.h.

References m_sourcePhrase.

Referenced by Moses::TranslationOption::TranslationOption().

Here is the caller graph for this function:

const Word& Moses::TargetPhrase::GetTargetLHS (  )  const [inline]

Definition at line 143 of file TargetPhrase.h.

References m_lhsTarget.

Referenced by Moses::ChartHypothesis::GetTargetLHS().

Here is the caller graph for this function:

TargetPhrase * Moses::TargetPhrase::MergeNext ( const TargetPhrase targetPhrase  )  const

Definition at line 285 of file TargetPhrase.cpp.

References Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), Moses::Phrase::IsCompatible(), m_sourcePhrase, Moses::Word::Merge(), NULL, and TargetPhrase().

Here is the call graph for this function:

void Moses::TargetPhrase::ResetScore (  ) 

Definition at line 279 of file TargetPhrase.cpp.

References m_fullScore, m_scoreBreakdown, and Moses::ScoreComponentCollection::ZeroAll().

Here is the call graph for this function:

void Moses::TargetPhrase::SetAlignmentInfo ( const AlignmentInfo alignmentInfo  )  [inline]

Definition at line 149 of file TargetPhrase.h.

References m_alignmentInfo.

void Moses::TargetPhrase::SetAlignmentInfo ( const std::set< std::pair< size_t, size_t > > &  alignmentInfo  ) 

Definition at line 333 of file TargetPhrase.cpp.

References Moses::AlignmentInfoCollection::Add(), Moses::AlignmentInfoCollection::Instance(), and m_alignmentInfo.

Here is the call graph for this function:

void Moses::TargetPhrase::SetAlignmentInfo ( const StringPiece alignString  ) 

void Moses::TargetPhrase::SetScore ( const ScoreProducer producer,
const Scores scoreVector 
)

Definition at line 257 of file TargetPhrase.cpp.

References Moses::ScoreComponentCollection::Assign(), Moses::ScoreComponentCollection::GetWeightedScore(), m_fullScore, and m_scoreBreakdown.

Here is the call graph for this function:

void Moses::TargetPhrase::SetScore ( const ScoreProducer translationScoreProducer,
const Scores scoreVector,
const std::vector< float > &  weightT,
float  weightWP,
const LMList languageModels 
)

void Moses::TargetPhrase::SetScore ( const TranslationSystem system,
const Scores scoreVector 
)

void Moses::TargetPhrase::SetScore ( float  score  ) 

void Moses::TargetPhrase::SetScore ( const TranslationSystem system  ) 

used by the unknown word handler- these targets don't have a translation score, so wp is the only thing used

Definition at line 76 of file TargetPhrase.cpp.

References Moses::TranslationSystem::GetWeightWordPenalty(), m_fullScore, and m_transScore.

Referenced by Moses::PDTAimp::CreateTargetPhrase(), Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), Moses::ProcessAndStripXMLTags(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), Moses::ChartTranslationOptionCollection::ProcessOneUnknownWord(), and SetScore().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::TargetPhrase::SetScoreChart ( const ScoreProducer translationScoreProducer,
const Scores scoreVector,
const std::vector< float > &  weightT,
const LMList languageModels,
const WordPenaltyProducer wpProducer 
)

Referenced by Moses::RuleTableLoaderStandard::Load().

Here is the caller graph for this function:

void Moses::TargetPhrase::SetSourcePhrase ( Phrase const *  p  )  [inline]

TODO - why is this needed and is it set correctly by every phrase dictionary class ? should be set in constructor.

Definition at line 133 of file TargetPhrase.h.

References m_sourcePhrase.

Referenced by Moses::PDTAimp::CreateTargetPhrase(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), and Moses::ChartTranslationOptionCollection::ProcessOneUnknownWord().

Here is the caller graph for this function:

void Moses::TargetPhrase::SetTargetLHS ( const Word lhs  )  [inline]

Definition at line 140 of file TargetPhrase.h.

References m_lhsTarget.

Referenced by Moses::RuleTableLoaderStandard::Load(), and Moses::ChartTranslationOptionCollection::ProcessOneUnknownWord().

Here is the caller graph for this function:

void Moses::TargetPhrase::SetWeights ( const ScoreProducer ,
const std::vector< float > &  weightT 
)

Moses::TargetPhrase::TO_STRING (  ) 

Reimplemented from Moses::Phrase.


Friends And Related Function Documentation

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

Definition at line 341 of file TargetPhrase.cpp.


Member Data Documentation

Definition at line 54 of file TargetPhrase.h.

Referenced by GetAlignmentInfo(), and SetAlignmentInfo().

Definition at line 52 of file TargetPhrase.h.

Referenced by GetFutureScore(), Moses::operator<<(), ResetScore(), and SetScore().

Definition at line 58 of file TargetPhrase.h.

Referenced by GetTargetLHS(), and SetTargetLHS().

Definition at line 53 of file TargetPhrase.h.

Referenced by GetScoreBreakdown(), ResetScore(), and SetScore().

Definition at line 57 of file TargetPhrase.h.

Referenced by GetSourcePhrase(), MergeNext(), and SetSourcePhrase().

Definition at line 51 of file TargetPhrase.h.

Referenced by Moses::operator<<(), and SetScore().


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

Generated on Wed Feb 8 22:04:09 2012 for Moses by  doxygen 1.5.9