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 | aceb387526478e34e41db6c046f707234953e0b5 (patch) | |
| tree | 3cb19b9f1c3390d52c4a732e22a3b31b52e4f483 /dtrain/kbestget.h | |
| parent | 2001f2c1c96049b78f9aa5aaa05aeca26e3fc55a (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); | 
