From 190ad8ae1e131ac0e29ff975b0d6502f3cc57af6 Mon Sep 17 00:00:00 2001 From: graehl Date: Mon, 19 Jul 2010 23:40:30 +0000 Subject: fixed oracle generate, detailed score info with --verbose git-svn-id: https://ws10smt.googlecode.com/svn/trunk@329 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/ter.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vest/ter.cc') diff --git a/vest/ter.cc b/vest/ter.cc index b4ebc4f5..8c8494ad 100644 --- a/vest/ter.cc +++ b/vest/ter.cc @@ -9,7 +9,7 @@ #include #include #include - +#include #include "tdict.h" const bool ter_use_average_ref_len = true; @@ -432,8 +432,12 @@ class TERScore : public Score { void ScoreDetails(string* details) const; void PlusPartialEquals(const Score& rhs, int oracle_e_cover, int oracle_f_cover, int src_len){} void PlusEquals(const Score& delta, const float scale) { - stats += static_cast(delta).stats; - } + if (scale==1) + stats += static_cast(delta).stats; + if (scale==-1) + stats -= static_cast(delta).stats; + throw std::runtime_error("TERScore::PlusEquals with scale != +-1"); + } void PlusEquals(const Score& delta) { stats += static_cast(delta).stats; } -- cgit v1.2.3