mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
Subtract prior scores when outputting phrase-based hypergraph arcs.
This commit is contained in:
parent
3e73ac29b2
commit
fe5e737589
@ -801,8 +801,11 @@ size_t Manager::OutputFeatureValuesForSLF(size_t index, bool zeros, const Hypoth
|
|||||||
size_t Manager::OutputFeatureValuesForHypergraph(size_t index, const Hypothesis* hypo, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const
|
size_t Manager::OutputFeatureValuesForHypergraph(size_t index, const Hypothesis* hypo, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const
|
||||||
{
|
{
|
||||||
|
|
||||||
const ScoreComponentCollection& scoreCollection = hypo->GetScoreBreakdown();
|
ScoreComponentCollection scoreCollection = hypo->GetScoreBreakdown();
|
||||||
|
const Hypothesis *prevHypo = hypo->GetPrevHypo();
|
||||||
|
if (prevHypo) {
|
||||||
|
scoreCollection.MinusEquals( prevHypo->GetScoreBreakdown() );
|
||||||
|
}
|
||||||
vector<float> featureValues = scoreCollection.GetScoresForProducer(ff);
|
vector<float> featureValues = scoreCollection.GetScoresForProducer(ff);
|
||||||
size_t numScoreComps = featureValues.size();
|
size_t numScoreComps = featureValues.size();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user