diff options
author | Chris Dyer <redpony@gmail.com> | 2014-10-16 23:26:09 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-10-16 23:26:09 -0400 |
commit | c7524d61b93c751e90568789330a2de7cfae53be (patch) | |
tree | 3a7f7075dfd73ae2c6cf928665633ef85e17a9c2 /decoder/oracle_bleu.h | |
parent | b26cda84e05d4523eee069234a975a0153bf8608 (diff) | |
parent | 7d0990b52cd757f15d190c1fee122f262c4731a7 (diff) |
Merge pull request #58 from kho/xml
Add --show_derivations_mask to control what to print when --show_derivations
Diffstat (limited to 'decoder/oracle_bleu.h')
-rw-r--r-- | decoder/oracle_bleu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/decoder/oracle_bleu.h b/decoder/oracle_bleu.h index d2c4715c..893e36ca 100644 --- a/decoder/oracle_bleu.h +++ b/decoder/oracle_bleu.h @@ -252,6 +252,8 @@ struct OracleBleu { } bool show_derivation; + int show_derivation_mask; + template <class Filter> void kbest(int sent_id,Hypergraph const& forest,int k,std::ostream &kbest_out=std::cout,std::ostream &deriv_out=std::cerr) { using namespace std; @@ -275,7 +277,7 @@ struct OracleBleu { if (show_derivation) { deriv_out<<"\nsent_id="<<sent_id<<"."<<i<<" ||| "; //where i is candidate #/k deriv_out<<log(d->score)<<"\n"; - deriv_out<<kbest.derivation_tree(*d,true); + deriv_out<<kbest.derivation_tree(*d,true, show_derivation_mask); deriv_out<<"\n"<<flush; } } |