diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-08-08 02:00:45 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-08-08 02:00:45 +0300 |
commit | 21aa5af640946c0f00c717a0774d05441a4b6902 (patch) | |
tree | 263d9827fd439e6c909b771821776e40151b7fc8 /moses/LatticeMBR.cpp | |
parent | 883c34aee9266cce72f9a8851e863cb4b910c718 (diff) |
daily automatic beautifier
Diffstat (limited to 'moses/LatticeMBR.cpp')
-rw-r--r-- | moses/LatticeMBR.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/moses/LatticeMBR.cpp b/moses/LatticeMBR.cpp index 46fb16242..8dffda1b1 100644 --- a/moses/LatticeMBR.cpp +++ b/moses/LatticeMBR.cpp @@ -490,18 +490,18 @@ bool Edge::operator< (const Edge& compare ) const ostream& operator<< (ostream& out, const Edge& edge) { - out << "Head: " << edge.m_headNode->GetId() - << ", Tail: " << edge.m_tailNode->GetId() - << ", Score: " << edge.m_score + out << "Head: " << edge.m_headNode->GetId() + << ", Tail: " << edge.m_tailNode->GetId() + << ", Score: " << edge.m_score << ", Phrase: " << edge.m_targetPhrase << endl; return out; } bool ascendingCoverageCmp(const Hypothesis* a, const Hypothesis* b) { - return (a->GetWordsBitmap().GetNumWordsCovered() - < - b->GetWordsBitmap().GetNumWordsCovered()); + return (a->GetWordsBitmap().GetNumWordsCovered() + < + b->GetWordsBitmap().GetNumWordsCovered()); } void getLatticeMBRNBest(const Manager& manager, const TrellisPathList& nBestList, @@ -514,19 +514,19 @@ void getLatticeMBRNBest(const Manager& manager, const TrellisPathList& nBestList std::map < const Hypothesis*, set <const Hypothesis*> > outgoingHyps; map<const Hypothesis*, vector<Edge> > incomingEdges; vector< float> estimatedScores; - manager.GetForwardBackwardSearchGraph(&connected, &connectedList, - &outgoingHyps, &estimatedScores); + manager.GetForwardBackwardSearchGraph(&connected, &connectedList, + &outgoingHyps, &estimatedScores); LMBR_Options const& lmbr = manager.options().lmbr; MBR_Options const& mbr = manager.options().mbr; - pruneLatticeFB(connectedList, outgoingHyps, incomingEdges, estimatedScores, - manager.GetBestHypothesis(), lmbr.pruning_factor, mbr.scale); + pruneLatticeFB(connectedList, outgoingHyps, incomingEdges, estimatedScores, + manager.GetBestHypothesis(), lmbr.pruning_factor, mbr.scale); calcNgramExpectations(connectedList, incomingEdges, ngramPosteriors,true); vector<float> mbrThetas = lmbr.theta; float p = lmbr.precision; float r = lmbr.ratio; float mapWeight = lmbr.map_weight; - if (mbrThetas.size() == 0) { + if (mbrThetas.size() == 0) { // thetas were not specified on the command line, so use p and r instead mbrThetas.push_back(-1); //Theta 0 mbrThetas.push_back(1/(bleu_order*p)); @@ -580,8 +580,8 @@ const TrellisPath doConsensusDecoding(const Manager& manager, const TrellisPathL manager.GetForwardBackwardSearchGraph(&connected, &connectedList, &outgoingHyps, &estimatedScores); LMBR_Options const& lmbr = manager.options().lmbr; MBR_Options const& mbr = manager.options().mbr; - pruneLatticeFB(connectedList, outgoingHyps, incomingEdges, estimatedScores, - manager.GetBestHypothesis(), lmbr.pruning_factor, mbr.scale); + pruneLatticeFB(connectedList, outgoingHyps, incomingEdges, estimatedScores, + manager.GetBestHypothesis(), lmbr.pruning_factor, mbr.scale); calcNgramExpectations(connectedList, incomingEdges, ngramExpectations,false); //expected length is sum of expected unigram counts |