diff options
Diffstat (limited to 'lm/builder/interpolate.hh')
-rw-r--r-- | lm/builder/interpolate.hh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lm/builder/interpolate.hh b/lm/builder/interpolate.hh new file mode 100644 index 000000000..9268d404c --- /dev/null +++ b/lm/builder/interpolate.hh @@ -0,0 +1,27 @@ +#ifndef LM_BUILDER_INTERPOLATE__ +#define LM_BUILDER_INTERPOLATE__ + +#include <stdint.h> + +#include "lm/builder/multi_stream.hh" + +namespace lm { namespace builder { + +/* Interpolate step. + * Input: suffix sorted n-grams with (p_uninterpolated, gamma) from + * InitialProbabilities. + * Output: suffix sorted n-grams with complete probability + */ +class Interpolate { + public: + explicit Interpolate(uint64_t unigram_count, const ChainPositions &backoffs); + + void Run(const ChainPositions &positions); + + private: + float uniform_prob_; + ChainPositions backoffs_; +}; + +}} // namespaces +#endif // LM_BUILDER_INTERPOLATE__ |