summaryrefslogtreecommitdiff
path: root/decoder/oracle_bleu.h
diff options
context:
space:
mode:
authorWu, Ke <wuke@cs.umd.edu>2014-10-15 11:42:21 -0400
committerWu, Ke <wuke@cs.umd.edu>2014-10-15 11:42:21 -0400
commit7d0990b52cd757f15d190c1fee122f262c4731a7 (patch)
tree047c32f65a0a9ef37be6335f036d9543a711dbfd /decoder/oracle_bleu.h
parentd88186af251ecae60974b20395ce75807bfdda35 (diff)
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.h4
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;
}
}