diff options
author | Patrick Simianer <p@simianer.de> | 2015-09-28 09:50:03 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-09-28 09:50:03 +0200 |
commit | d507c07dc60af01a0897df1c6f34df7089cbbd69 (patch) | |
tree | 2ae85ab943ec7604a6bf0b87e972dbab353a029d /training/dtrain/sample.h | |
parent | b6d4eef7d31e357bc59e40655123138806535704 (diff) |
output viterbi tree
Diffstat (limited to 'training/dtrain/sample.h')
-rw-r--r-- | training/dtrain/sample.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/training/dtrain/sample.h b/training/dtrain/sample.h index 03cc82c3..e24b65cf 100644 --- a/training/dtrain/sample.h +++ b/training/dtrain/sample.h @@ -16,6 +16,7 @@ struct ScoredKbest : public DecoderObserver PerSentenceBleuScorer* scorer_; vector<Ngrams>* ref_ngs_; vector<size_t>* ref_ls_; + string viterbi_tree_str; ScoredKbest(const size_t k, PerSentenceBleuScorer* scorer) : k_(k), scorer_(scorer) {} @@ -40,6 +41,7 @@ struct ScoredKbest : public DecoderObserver samples_.push_back(h); effective_sz_++; feature_count_ += h.f.size(); + viterbi_tree_str = hg->show_viterbi_tree(false); } } @@ -51,6 +53,7 @@ struct ScoredKbest : public DecoderObserver } inline size_t GetFeatureCount() { return feature_count_; } inline size_t GetSize() { return effective_sz_; } + inline string GetViterbiTreeString() { return viterbi_tree_str; } }; } // namespace |