#include <TrellisPath.h>

Public Member Functions | |
| TrellisPath () | |
| TrellisPath (const Hypothesis *hypo) | |
| create path OF pure hypo | |
| TrellisPath (const TrellisPath ©, size_t edgeIndex, const Hypothesis *arc) | |
| float | GetTotalScore () const |
| get score for this path throught trellis | |
| const std::vector< const Hypothesis * > & | GetEdges () const |
| void | CreateDeviantPaths (TrellisPathCollection &pathColl) const |
| create a set of next best paths by wiggling 1 of the node at a time. | |
| void | CreateDeviantPaths (TrellisPathList &pathColl) const |
| create a list of next best paths by wiggling 1 of the node at a time. | |
| const ScoreComponentCollection & | GetScoreBreakdown () const |
| WordsRange | GetTargetWordsRange (const Hypothesis &hypo) const |
| get target words range of the hypo within n-best trellis. not necessarily the same as hypo.GetCurrTargetWordsRange() | |
| Phrase | GetTargetPhrase () const |
| Phrase | GetSurfacePhrase () const |
| TO_STRING () | |
Protected Member Functions | |
| TrellisPath (const std::vector< const Hypothesis * > edges) | |
| void | InitScore () |
Protected Attributes | |
| std::vector< const Hypothesis * > | m_path |
| size_t | m_prevEdgeChanged |
| ScoreComponentCollection | m_scoreBreakdown |
| float | m_totalScore |
Friends | |
| class | Manager |
| std::ostream & | operator<< (std::ostream &, const TrellisPath &) |
Definition at line 41 of file TrellisPath.h.
| Moses::TrellisPath::TrellisPath | ( | const std::vector< const Hypothesis * > | edges | ) | [protected] |
| Moses::TrellisPath::TrellisPath | ( | ) |
| Moses::TrellisPath::TrellisPath | ( | const Hypothesis * | hypo | ) |
create path OF pure hypo
Definition at line 31 of file TrellisPath.cpp.
References Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetScoreBreakdown(), Moses::Hypothesis::GetTotalScore(), m_path, m_scoreBreakdown, m_totalScore, and NULL.

| Moses::TrellisPath::TrellisPath | ( | const TrellisPath & | copy, | |
| size_t | edgeIndex, | |||
| const Hypothesis * | arc | |||
| ) |
create path from another path, deviate at edgeIndex by using arc instead, which may change other hypo back from there
Definition at line 63 of file TrellisPath.cpp.
References Moses::Hypothesis::GetPrevHypo(), InitScore(), m_path, and NULL.

| void Moses::TrellisPath::CreateDeviantPaths | ( | TrellisPathList & | pathColl | ) | const |
create a list of next best paths by wiggling 1 of the node at a time.
Definition at line 135 of file TrellisPath.cpp.
References Moses::TrellisPathList::Add(), Moses::Hypothesis::GetArcList(), m_path, m_prevEdgeChanged, NOT_FOUND, and TrellisPath().

| void Moses::TrellisPath::CreateDeviantPaths | ( | TrellisPathCollection & | pathColl | ) | const |
create a set of next best paths by wiggling 1 of the node at a time.
Definition at line 96 of file TrellisPath.cpp.
References Moses::TrellisPathCollection::Add(), Moses::Hypothesis::GetArcList(), m_path, m_prevEdgeChanged, NOT_FOUND, and TrellisPath().
Referenced by Moses::Manager::CalcNBest().


| const std::vector<const Hypothesis *>& Moses::TrellisPath::GetEdges | ( | ) | const [inline] |
list of each hypo/arcs in path. For anything other than the best hypo, it is not possible just to follow the m_prevHypo variable in the hypothesis object
Definition at line 80 of file TrellisPath.h.
References m_path.
Referenced by GetOutputFactors(), GetOutputWords(), LatticeMBRSolution::LatticeMBRSolution(), OutputAlignment(), OutputBestHypo(), and OutputNBest().

| const ScoreComponentCollection& Moses::TrellisPath::GetScoreBreakdown | ( | ) | const [inline] |
Definition at line 90 of file TrellisPath.h.
References m_scoreBreakdown.
Referenced by doMBR(), Moses::operator<<(), and OutputNBest().

| Phrase Moses::TrellisPath::GetSurfacePhrase | ( | ) | const |
Definition at line 190 of file TrellisPath.cpp.
References Moses::Phrase::AddWord(), CHECK, Moses::Phrase::GetFactor(), Moses::StaticData::GetOutputFactorOrder(), Moses::Phrase::GetSize(), GetTargetPhrase(), and Moses::StaticData::Instance().
Referenced by Moses::Manager::CalcNBest().


| Phrase Moses::TrellisPath::GetTargetPhrase | ( | ) | const |
Definition at line 174 of file TrellisPath.cpp.
References Moses::Phrase::Append(), Moses::ARRAY_SIZE_INCR, Moses::Hypothesis::GetCurrTargetPhrase(), and m_path.
Referenced by GetSurfacePhrase().


| WordsRange Moses::TrellisPath::GetTargetWordsRange | ( | const Hypothesis & | hypo | ) | const |
get target words range of the hypo within n-best trellis. not necessarily the same as hypo.GetCurrTargetWordsRange()
Definition at line 209 of file TrellisPath.cpp.
References CHECK, Moses::Hypothesis::GetCurrTargetLength(), m_path, and NOT_FOUND.
Referenced by OutputNBest().


| float Moses::TrellisPath::GetTotalScore | ( | ) | const [inline] |
get score for this path throught trellis
Definition at line 73 of file TrellisPath.h.
References m_totalScore.
Referenced by LatticeMBRSolution::LatticeMBRSolution(), Moses::CompareTrellisPathCollection::operator()(), Moses::operator<<(), and OutputNBest().

| void Moses::TrellisPath::InitScore | ( | ) | [protected] |
Definition at line 44 of file TrellisPath.cpp.
References Moses::Hypothesis::GetScoreBreakdown(), Moses::Hypothesis::GetTotalScore(), Moses::Hypothesis::GetWinningHypo(), m_path, m_scoreBreakdown, m_totalScore, Moses::ScoreComponentCollection::MinusEquals(), and Moses::ScoreComponentCollection::PlusEquals().
Referenced by TrellisPath().


| Moses::TrellisPath::TO_STRING | ( | ) |
friend class Manager [friend] |
Definition at line 44 of file TrellisPath.h.
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const TrellisPath & | path | |||
| ) | [friend] |
Definition at line 105 of file TrellisPath.h.
std::vector<const Hypothesis *> Moses::TrellisPath::m_path [protected] |
Definition at line 47 of file TrellisPath.h.
Referenced by CreateDeviantPaths(), GetEdges(), GetTargetPhrase(), GetTargetWordsRange(), InitScore(), Moses::operator<<(), and TrellisPath().
size_t Moses::TrellisPath::m_prevEdgeChanged [protected] |
the last node that was wiggled to create this path , or NOT_FOUND if this path is the best trans so consist of only hypos
Definition at line 48 of file TrellisPath.h.
Referenced by CreateDeviantPaths().
Definition at line 52 of file TrellisPath.h.
Referenced by GetScoreBreakdown(), InitScore(), and TrellisPath().
float Moses::TrellisPath::m_totalScore [protected] |
Definition at line 53 of file TrellisPath.h.
Referenced by GetTotalScore(), InitScore(), and TrellisPath().
1.5.9