diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 03:59:31 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 03:59:31 +0000 |
commit | aef15981e94fab6c694a5b3059632a762647d1fc (patch) | |
tree | 5538d2c41f147d8028ce40f2458e288a7c69e9ac /decoder/oracle_bleu.h | |
parent | 328dd105566278e6a8dff0ecafb91dab7e69799d (diff) |
vest generate --verbose
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@315 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/oracle_bleu.h')
-rwxr-xr-x | decoder/oracle_bleu.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/decoder/oracle_bleu.h b/decoder/oracle_bleu.h index 07d83b7f..66d155d3 100755 --- a/decoder/oracle_bleu.h +++ b/decoder/oracle_bleu.h @@ -35,7 +35,7 @@ struct Translation { ViterbiESentence(hg,&sentence); features=ViterbiFeatures(hg,feature_weights,true); } - void Print(std::ostream &out,std::string pre=" +Oracle BLEU ") { + void Print(std::ostream &out,std::string pre=" +Oracle BLEU ") const { out<<pre<<"Viterbi: "<<TD::GetString(sentence)<<"\n"; out<<pre<<"features: "<<features<<std::endl; } @@ -46,11 +46,10 @@ struct Translation { }; struct Oracle { + Translation model,fear,hope; bool is_null() { return model.is_null() /* && fear.is_null() && hope.is_null() */; } - - Translation model,fear,hope; // feature 0 will be the error rate in fear and hope // move toward hope FeatureVector ModelHopeGradient() const { @@ -64,6 +63,16 @@ struct Oracle { r.set_value(0,0); return r; } + void Print(std::ostream &out) const { + hope.Print(out,"hope "); + model.Print(out,"model "); + fear.Print(out,"fear "); + } + friend inline std::ostream & operator<<(std::ostream &out,Oracle const& o) { + o.Print(out); + return out; + } + }; |