#include <TargetPhrase.h>


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) |
| TargetPhrase * | MergeNext (const TargetPhrase &targetPhrase) const |
| float | GetFutureScore () const |
| const ScoreComponentCollection & | GetScoreBreakdown () 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 Word & | GetTargetLHS () const |
| void | SetAlignmentInfo (const StringPiece &alignString) |
| void | SetAlignmentInfo (const std::set< std::pair< size_t, size_t > > &alignmentInfo) |
| void | SetAlignmentInfo (const AlignmentInfo *alignmentInfo) |
| const AlignmentInfo & | GetAlignmentInfo () const |
| TO_STRING () | |
Protected Attributes | |
| float | m_transScore |
| float | m_fullScore |
| ScoreComponentCollection | m_scoreBreakdown |
| const AlignmentInfo * | m_alignmentInfo |
| Phrase const * | m_sourcePhrase |
| Word | m_lhsTarget |
Friends | |
| std::ostream & | operator<< (std::ostream &, const TargetPhrase &) |
Definition at line 47 of file TargetPhrase.h.
| Moses::TargetPhrase::TargetPhrase | ( | ) |
Definition at line 54 of file TargetPhrase.cpp.
Referenced by MergeNext().

| Moses::TargetPhrase::TargetPhrase | ( | std::string | out_string | ) |
Definition at line 43 of file TargetPhrase.cpp.
References Moses::Phrase::CreateFromString(), Moses::StaticData::GetFactorDelimiter(), Moses::StaticData::GetInputFactorOrder(), and Moses::StaticData::Instance().

| 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.
| const AlignmentInfo& Moses::TargetPhrase::GetAlignmentInfo | ( | ) | const [inline] |
Definition at line 153 of file TargetPhrase.h.
References m_alignmentInfo.
Referenced by Moses::ChartHypothesis::CreateOutputPhrase(), Moses::LanguageModelImplementation::EvaluateChart(), Moses::PhraseDictionarySCFG::GetOrCreateNode(), Moses::UTrieNode::GetOrCreateTargetPhraseCollection(), Moses::ChartTrellisNode::GetOutputPhrase(), Moses::operator<<(), OutputAlignment(), and OutputNBest().

| float Moses::TargetPhrase::GetFutureScore | ( | ) | const [inline] |
Definition at line 125 of file TargetPhrase.h.
References m_fullScore.
Referenced by Moses::PDTAimp::CacheSource(), Moses::ChartTranslationOption::CalcEstimateOfBestScore(), Moses::RuleCubeItem::EstimateScore(), Moses::PDTAimp::GetTargetPhraseCollection(), and Moses::CompareTargetPhrase::operator()().

| 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().

| Phrase const* Moses::TargetPhrase::GetSourcePhrase | ( | ) | const [inline] |
Definition at line 136 of file TargetPhrase.h.
References m_sourcePhrase.
Referenced by Moses::TranslationOption::TranslationOption().

| const Word& Moses::TargetPhrase::GetTargetLHS | ( | ) | const [inline] |
Definition at line 143 of file TargetPhrase.h.
References m_lhsTarget.
Referenced by Moses::ChartHypothesis::GetTargetLHS().

| 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().

| void Moses::TargetPhrase::ResetScore | ( | ) |
Definition at line 279 of file TargetPhrase.cpp.
References m_fullScore, m_scoreBreakdown, and Moses::ScoreComponentCollection::ZeroAll().

| void Moses::TargetPhrase::SetAlignmentInfo | ( | const AlignmentInfo * | alignmentInfo | ) | [inline] |
| 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.

| void Moses::TargetPhrase::SetAlignmentInfo | ( | const StringPiece & | alignString | ) |
Definition at line 316 of file TargetPhrase.cpp.
Referenced by Moses::PDTAimp::CreateTargetPhrase(), Moses::RuleTableLoaderStandard::Load(), and Moses::TranslationOptionCollection::ProcessOneUnknownWord().

| 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.

| 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 | |||
| ) |
Set score for unknown words with input weights.
used for setting scores for unknown words with input link features (lattice/conf. nets)
| scoreVector | input scores |
Definition at line 128 of file TargetPhrase.cpp.
References CHECK, Moses::StaticData::GetAllWeights(), Moses::ScoreIndexManager::GetBeginIndex(), Moses::ScoreIndexManager::GetEndIndex(), Moses::TranslationSystem::GetLanguageModels(), Moses::ScoreProducer::GetNumScoreComponents(), Moses::TranslationSystem::GetPhraseDictionaries(), Moses::ScoreProducer::GetScoreBookkeepingID(), Moses::StaticData::GetScoreIndexManager(), Moses::TranslationSystem::GetWeightWordPenalty(), Moses::StaticData::Instance(), and SetScore().

| void Moses::TargetPhrase::SetScore | ( | float | score | ) |
Set score for Sentence XML target options.
Definition at line 94 of file TargetPhrase.cpp.
References Moses::TranslationSystem::DEFAULT, Moses::StaticData::GetAllWeights(), Moses::ScoreIndexManager::GetBeginIndex(), Moses::ScoreIndexManager::GetEndIndex(), Moses::TranslationSystem::GetLanguageModels(), Moses::ScoreProducer::GetNumScoreComponents(), Moses::TranslationSystem::GetPhraseDictionaries(), Moses::ScoreProducer::GetScoreBookkeepingID(), Moses::StaticData::GetScoreIndexManager(), Moses::StaticData::GetTranslationSystem(), Moses::TranslationSystem::GetWeightWordPenalty(), Moses::StaticData::Instance(), and SetScore().

| 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().


| void Moses::TargetPhrase::SetScoreChart | ( | const ScoreProducer * | translationScoreProducer, | |
| const Scores & | scoreVector, | |||
| const std::vector< float > & | weightT, | |||
| const LMList & | languageModels, | |||
| const WordPenaltyProducer * | wpProducer | |||
| ) |
| 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().

| 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().

| void Moses::TargetPhrase::SetWeights | ( | const ScoreProducer * | , | |
| const std::vector< float > & | weightT | |||
| ) |
| Moses::TargetPhrase::TO_STRING | ( | ) |
Reimplemented from Moses::Phrase.
| std::ostream& operator<< | ( | std::ostream & | , | |
| const TargetPhrase & | ||||
| ) | [friend] |
Definition at line 341 of file TargetPhrase.cpp.
const AlignmentInfo* Moses::TargetPhrase::m_alignmentInfo [protected] |
Definition at line 54 of file TargetPhrase.h.
Referenced by GetAlignmentInfo(), and SetAlignmentInfo().
float Moses::TargetPhrase::m_fullScore [protected] |
Definition at line 52 of file TargetPhrase.h.
Referenced by GetFutureScore(), Moses::operator<<(), ResetScore(), and SetScore().
Word Moses::TargetPhrase::m_lhsTarget [protected] |
Definition at line 53 of file TargetPhrase.h.
Referenced by GetScoreBreakdown(), ResetScore(), and SetScore().
Phrase const* Moses::TargetPhrase::m_sourcePhrase [protected] |
Definition at line 57 of file TargetPhrase.h.
Referenced by GetSourcePhrase(), MergeNext(), and SetSourcePhrase().
float Moses::TargetPhrase::m_transScore [protected] |
1.5.9