diff options
Diffstat (limited to 'training/dtrain/sample_net_interface.h')
-rw-r--r-- | training/dtrain/sample_net_interface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/training/dtrain/sample_net_interface.h b/training/dtrain/sample_net_interface.h index affcd0d6..a2b5f87d 100644 --- a/training/dtrain/sample_net_interface.h +++ b/training/dtrain/sample_net_interface.h @@ -17,6 +17,7 @@ struct ScoredKbest : public DecoderObserver vector<Ngrams>* ref_ngs_; vector<size_t>* ref_ls_; bool dont_score; + string viterbiTreeStr_; ScoredKbest(const size_t k, PerSentenceBleuScorer* scorer) : k_(k), scorer_(scorer), dont_score(false) {} @@ -42,6 +43,7 @@ struct ScoredKbest : public DecoderObserver samples_.push_back(h); effective_sz_++; feature_count_ += h.f.size(); + viterbiTreeStr_ = hg->show_viterbi_tree(false); } } @@ -53,6 +55,7 @@ struct ScoredKbest : public DecoderObserver } inline size_t GetFeatureCount() { return feature_count_; } inline size_t GetSize() { return effective_sz_; } + inline string GetViterbiTreeStr() { return viterbiTreeStr_; } }; } // namespace |