diff options
author | Patrick Simianer <p@simianer.de> | 2011-08-29 22:02:45 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-09-23 19:13:58 +0200 |
commit | aa5f96417ff81408b15b54aab35a3c16b845adf8 (patch) | |
tree | cb9715696bf11d095215a97e299e22fed940ec02 /dtrain/kbestget.h | |
parent | 7a562c98d69abfe9ec921f37828f827f44d5dc82 (diff) |
big update: working iterating, pretty output, test scripts and more
Diffstat (limited to 'dtrain/kbestget.h')
-rw-r--r-- | dtrain/kbestget.h | 8 |
1 files changed, 5 insertions, 3 deletions
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<vector<WordID>, ESentenceTraversal> kbest( forest, k_ ); + // FIXME TODO FIXME TODO + KBest::KBestDerivations<vector<WordID>, ESentenceTraversal, KBest::FilterUnique, prob_t, EdgeProb> kbest( forest, k_ ); for ( size_t i = 0; i < k_; ++i ) { - const KBest::KBestDerivations<vector<WordID>, ESentenceTraversal>::Derivation* d = + const KBest::KBestDerivations<vector<WordID>, ESentenceTraversal, KBest::FilterUnique, prob_t, EdgeProb>::Derivation* d = kbest.LazyKthBest( forest.nodes_.size() - 1, i ); if (!d) break; kb.sents.push_back( d->yield); |