diff options
Diffstat (limited to 'vest/comb_scorer.cc')
-rw-r--r-- | vest/comb_scorer.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vest/comb_scorer.cc b/vest/comb_scorer.cc index 7b2187f4..3dd077a6 100644 --- a/vest/comb_scorer.cc +++ b/vest/comb_scorer.cc @@ -8,6 +8,7 @@ class BLEUTERCombinationScore : public Score { friend class BLEUTERCombinationScorer; public: ~BLEUTERCombinationScore(); + float ComputePartialScore() const { return 0.0;} float ComputeScore() const { return (bleu->ComputeScore() - ter->ComputeScore()) / 2.0f; } @@ -17,10 +18,25 @@ class BLEUTERCombinationScore : public Score { ComputeScore()*100.0f, bleu->ComputeScore()*100.0f, ter->ComputeScore()*100.0f); *details = buf; } + void PlusPartialEquals(const Score& rhs, int oracle_e_cover, int oracle_f_cover, int src_len){} + + void PlusEquals(const Score& delta, const float scale) { + bleu->PlusEquals(*static_cast<const BLEUTERCombinationScore&>(delta).bleu, scale); + ter->PlusEquals(*static_cast<const BLEUTERCombinationScore&>(delta).ter, scale); + } void PlusEquals(const Score& delta) { bleu->PlusEquals(*static_cast<const BLEUTERCombinationScore&>(delta).bleu); ter->PlusEquals(*static_cast<const BLEUTERCombinationScore&>(delta).ter); } + + + + Score* GetOne() const { + BLEUTERCombinationScore* res = new BLEUTERCombinationScore; + res->bleu = bleu->GetOne(); + res->ter = ter->GetOne(); + return res; + } Score* GetZero() const { BLEUTERCombinationScore* res = new BLEUTERCombinationScore; res->bleu = bleu->GetZero(); @@ -65,6 +81,11 @@ BLEUTERCombinationScorer::~BLEUTERCombinationScorer() { delete ter_; } +Score* BLEUTERCombinationScorer::ScoreCCandidate(const vector<WordID>& hyp) const { + Score* a = NULL; + return a; +} + Score* BLEUTERCombinationScorer::ScoreCandidate(const std::vector<WordID>& hyp) const { BLEUTERCombinationScore* res = new BLEUTERCombinationScore; res->bleu = bleu_->ScoreCandidate(hyp); |