From aceb387526478e34e41db6c046f707234953e0b5 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Mon, 29 Aug 2011 22:02:45 +0200 Subject: big update: working iterating, pretty output, test scripts and more --- dtrain/kbestget.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dtrain/kbestget.h') diff --git a/dtrain/kbestget.h b/dtrain/kbestget.h index 6d93d3b7..5247a2be 100644 --- a/dtrain/kbestget.h +++ b/dtrain/kbestget.h @@ -1,6 +1,7 @@ #ifndef _DTRAIN_KBESTGET_H_ #define _DTRAIN_KBESTGET_H_ +#include "kbest.h" namespace dtrain { @@ -36,14 +37,15 @@ struct KBestGetter : public DecoderObserver KBestList* GetKBest() { return &kb; } void - GetKBest(int sent_id, const Hypergraph& forest) + GetKBest(int sid, const Hypergraph& forest) { kb.scores.clear(); kb.sents.clear(); kb.feats.clear(); - KBest::KBestDerivations, ESentenceTraversal> kbest( forest, k_ ); + // FIXME TODO FIXME TODO + KBest::KBestDerivations, ESentenceTraversal, KBest::FilterUnique, prob_t, EdgeProb> kbest( forest, k_ ); for ( size_t i = 0; i < k_; ++i ) { - const KBest::KBestDerivations, ESentenceTraversal>::Derivation* d = + const KBest::KBestDerivations, ESentenceTraversal, KBest::FilterUnique, prob_t, EdgeProb>::Derivation* d = kbest.LazyKthBest( forest.nodes_.size() - 1, i ); if (!d) break; kb.sents.push_back( d->yield); -- cgit v1.2.3