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 (FactorDirection direction=Output)
 TargetPhrase (FactorDirection direction, std::string out_string)
 ~TargetPhrase ()
void SetAlignment ()
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 std::string &alignString)
void SetAlignmentInfo (const std::list< std::pair< size_t, size_t > > &alignmentInfo)
AlignmentInfoGetAlignmentInfo ()
const AlignmentInfoGetAlignmentInfo () const
void UseWordAlignment (bool a)
bool UseWordAlignment () const
void PrintAlignmentInfo (bool a)
bool PrintAlignmentInfo () const
void CreateCountInfo (const std::string &countStr)
 TO_STRING ()

Protected Attributes

float m_transScore
float m_ngramScore
float m_fullScore
ScoreComponentCollection m_scoreBreakdown
AlignmentInfo m_alignmentInfo
Phrase const * m_sourcePhrase
Word m_lhsTarget
CountInfo m_countInfo

Static Protected Attributes

static bool wordalignflag = StaticData::Instance().UseAlignmentInfo()
static bool printalign = StaticData::Instance().PrintAlignmentInfo()

Friends

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


Detailed Description

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

Constructor & Destructor Documentation

Moses::TargetPhrase::TargetPhrase ( FactorDirection  direction = Output  ) 

References Moses::StaticData::Instance(), printalign, Moses::StaticData::PrintAlignmentInfo(), Moses::StaticData::UseAlignmentInfo(), and wordalignflag.

Referenced by MergeNext().

Here is the call graph for this function:

Here is the caller graph for this function:

Moses::TargetPhrase::TargetPhrase ( FactorDirection  direction,
std::string  out_string 
)

Moses::TargetPhrase::~TargetPhrase (  ) 


Member Function Documentation

void Moses::TargetPhrase::CreateCountInfo ( const std::string &  countStr  ) 

References m_countInfo.

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

Here is the caller graph for this function:

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

References m_alignmentInfo.

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

References m_alignmentInfo.

Referenced by Moses::ChartRule::CreateNonTermIndex(), Moses::PhraseDictionarySCFG::GetOrCreateNode(), and Moses::operator<<().

Here is the caller graph for this function:

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

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

References m_scoreBreakdown.

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

Here is the caller graph for this function:

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

References m_sourcePhrase.

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

Here is the caller graph for this function:

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

References m_lhsTarget.

Referenced by Moses::operator<<().

Here is the caller graph for this function:

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

bool Moses::TargetPhrase::PrintAlignmentInfo (  )  const [inline]

References printalign.

void Moses::TargetPhrase::PrintAlignmentInfo ( bool  a  )  [inline]

References printalign.

Referenced by Moses::Hypothesis::PrintAlignmentInfo().

Here is the caller graph for this function:

void Moses::TargetPhrase::ResetScore (  ) 

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

Here is the call graph for this function:

void Moses::TargetPhrase::SetAlignment (  ) 

used by the unknown word handler. Set alignment to 0

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

References Moses::AlignmentInfo::AddAlignment(), and m_alignmentInfo.

Here is the call graph for this function:

void Moses::TargetPhrase::SetAlignmentInfo ( const std::string &  alignString  ) 

References Moses::Tokenize().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

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

Referenced by Moses::PDTAimp::CreateTargetPhrase(), Moses::PhraseDictionaryDynSuffixArray::GetTargetPhraseCollection(), Moses::ProcessAndStripXMLTags(), Moses::TranslationOptionCollection::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::PhraseDictionarySCFG::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.

References m_sourcePhrase.

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

Here is the caller graph for this function:

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

References m_lhsTarget.

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

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.

bool Moses::TargetPhrase::UseWordAlignment (  )  const [inline]

References wordalignflag.

void Moses::TargetPhrase::UseWordAlignment ( bool  a  )  [inline]

References wordalignflag.


Friends And Related Function Documentation

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


Member Data Documentation

Referenced by CreateCountInfo().

Referenced by GetTargetLHS(), and SetTargetLHS().

Referenced by ResetScore(), and SetScore().

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

bool Moses::TargetPhrase::printalign = StaticData::Instance().PrintAlignmentInfo() [static, protected]

Referenced by PrintAlignmentInfo(), and TargetPhrase().

bool Moses::TargetPhrase::wordalignflag = StaticData::Instance().UseAlignmentInfo() [static, protected]

Referenced by TargetPhrase(), and UseWordAlignment().


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

Generated on Wed Sep 8 20:05:17 2010 for Moses by  doxygen 1.5.9