diff options
Diffstat (limited to 'dtrain/hgsampler.h')
-rw-r--r-- | dtrain/hgsampler.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dtrain/hgsampler.h b/dtrain/hgsampler.h new file mode 100644 index 00000000..45c5b8f2 --- /dev/null +++ b/dtrain/hgsampler.h @@ -0,0 +1,30 @@ +// Chris Dyer +#ifndef _DTRAIN_HGSAMPLER_H_ +#define _DTRAIN_HGSAMPLER_H_ + + +#include <vector> +#include "sparse_vector.h" +#include "sampler.h" +#include "wordid.h" + +class Hypergraph; + +struct HypergraphSampler { + + struct Hypothesis { + std::vector<WordID> words; + SparseVector<double> fmap; + prob_t model_score; + }; + + static void + sample_hypotheses(const Hypergraph& hg, + unsigned n, + MT19937* rng, + std::vector<Hypothesis>* hypos); +}; + + +#endif + |