#include <TargetPhrase.h>


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) |
| 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 std::string &alignString) |
| void | SetAlignmentInfo (const std::list< std::pair< size_t, size_t > > &alignmentInfo) |
| AlignmentInfo & | GetAlignmentInfo () |
| const AlignmentInfo & | GetAlignmentInfo () 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 &) |
| Moses::TargetPhrase::TargetPhrase | ( | FactorDirection | direction = Output |
) |
References Moses::StaticData::Instance(), printalign, Moses::StaticData::PrintAlignmentInfo(), Moses::StaticData::UseAlignmentInfo(), and wordalignflag.
Referenced by MergeNext().


| Moses::TargetPhrase::TargetPhrase | ( | FactorDirection | direction, | |
| std::string | out_string | |||
| ) |
References Moses::Phrase::CreateFromString(), Moses::StaticData::GetFactorDelimiter(), Moses::StaticData::GetInputFactorOrder(), Moses::StaticData::Instance(), printalign, Moses::StaticData::PrintAlignmentInfo(), Moses::StaticData::UseAlignmentInfo(), and wordalignflag.

| Moses::TargetPhrase::~TargetPhrase | ( | ) |
| void Moses::TargetPhrase::CreateCountInfo | ( | const std::string & | countStr | ) |
References m_countInfo.
Referenced by Moses::PhraseDictionarySCFG::Load().

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

| float Moses::TargetPhrase::GetFutureScore | ( | ) | const [inline] |
References m_fullScore.
Referenced by Moses::ChartRuleCollection::Add(), Moses::PDTAimp::CacheSource(), Moses::PDTAimp::GetTargetPhraseCollection(), Moses::CompareTargetPhrase::operator()(), and Moses::ChartRuleOrderer::operator()().

| const ScoreComponentCollection& Moses::TargetPhrase::GetScoreBreakdown | ( | ) | const [inline] |
References m_scoreBreakdown.
Referenced by Moses::TranslationOption::TranslationOption().

| Phrase const* Moses::TargetPhrase::GetSourcePhrase | ( | ) | const [inline] |
References m_sourcePhrase.
Referenced by Moses::TranslationOption::TranslationOption().

| const Word& Moses::TargetPhrase::GetTargetLHS | ( | ) | const [inline] |
References m_lhsTarget.
Referenced by Moses::operator<<().

| TargetPhrase * Moses::TargetPhrase::MergeNext | ( | const TargetPhrase & | targetPhrase | ) | const |
References Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), Moses::Phrase::IsCompatible(), m_sourcePhrase, Moses::Word::Merge(), NULL, and TargetPhrase().

| bool Moses::TargetPhrase::PrintAlignmentInfo | ( | ) | const [inline] |
References printalign.
| void Moses::TargetPhrase::PrintAlignmentInfo | ( | bool | a | ) | [inline] |
References printalign.
Referenced by Moses::Hypothesis::PrintAlignmentInfo().

| void Moses::TargetPhrase::ResetScore | ( | ) |
References m_fullScore, m_ngramScore, m_scoreBreakdown, and Moses::ScoreComponentCollection::ZeroAll().

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

| void Moses::TargetPhrase::SetAlignmentInfo | ( | const std::string & | alignString | ) |
References Moses::Tokenize().
Referenced by Moses::PhraseDictionarySCFG::Load().


| void Moses::TargetPhrase::SetScore | ( | const ScoreProducer * | producer, | |
| const Scores & | scoreVector | |||
| ) |
References Moses::ScoreComponentCollection::Assign(), Moses::ScoreComponentCollection::GetWeightedScore(), m_fullScore, m_ngramScore, 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 |
References 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.
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
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().


| 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.
References m_sourcePhrase.
Referenced by Moses::PDTAimp::CreateTargetPhrase(), and Moses::TranslationOptionCollection::ProcessOneUnknownWord().

| void Moses::TargetPhrase::SetTargetLHS | ( | const Word & | lhs | ) | [inline] |
References m_lhsTarget.
Referenced by Moses::PhraseDictionarySCFG::Load().

| void Moses::TargetPhrase::SetWeights | ( | const ScoreProducer * | , | |
| const std::vector< float > & | weightT | |||
| ) |
Referenced by Moses::PhraseDictionaryNodeSCFG::SetWeightTransModel(), and Moses::PhraseDictionaryNode::SetWeightTransModel().

| 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.
| std::ostream& operator<< | ( | std::ostream & | , | |
| const TargetPhrase & | ||||
| ) | [friend] |
AlignmentInfo Moses::TargetPhrase::m_alignmentInfo [protected] |
Referenced by GetAlignmentInfo(), and SetAlignmentInfo().
CountInfo Moses::TargetPhrase::m_countInfo [protected] |
Referenced by CreateCountInfo().
float Moses::TargetPhrase::m_fullScore [protected] |
Referenced by GetFutureScore(), Moses::operator<<(), ResetScore(), and SetScore().
Word Moses::TargetPhrase::m_lhsTarget [protected] |
Referenced by GetTargetLHS(), and SetTargetLHS().
float Moses::TargetPhrase::m_ngramScore [protected] |
Referenced by ResetScore(), and SetScore().
Referenced by GetScoreBreakdown(), ResetScore(), and SetScore().
Phrase const* Moses::TargetPhrase::m_sourcePhrase [protected] |
Referenced by GetSourcePhrase(), MergeNext(), and SetSourcePhrase().
float Moses::TargetPhrase::m_transScore [protected] |
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().
1.5.9