diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-12-14 12:39:04 -0800 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-12-14 12:39:04 -0800 |
commit | de53e2e98acd0e2d07efb39bef430bd598908aa8 (patch) | |
tree | d6b4b8f72c9a417a371c90dcd17071f0f9e6440d /klm/search/config.hh | |
parent | 7b61618f1c9d7704bb6791b9098871ec1fbdce89 (diff) |
Updated incremental, updated kenlm. Incremental assumes <s>
Diffstat (limited to 'klm/search/config.hh')
-rw-r--r-- | klm/search/config.hh | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/klm/search/config.hh b/klm/search/config.hh index ef8e2354..ba18c09e 100644 --- a/klm/search/config.hh +++ b/klm/search/config.hh @@ -1,23 +1,36 @@ #ifndef SEARCH_CONFIG__ #define SEARCH_CONFIG__ -#include "search/weights.hh" -#include "util/string_piece.hh" +#include "search/types.hh" namespace search { +struct NBestConfig { + explicit NBestConfig(unsigned int in_size) { + keep = in_size; + size = in_size; + } + + unsigned int keep, size; +}; + class Config { public: - Config(const Weights &weights, unsigned int pop_limit) : - weights_(weights), pop_limit_(pop_limit) {} + Config(Score lm_weight, unsigned int pop_limit, const NBestConfig &nbest) : + lm_weight_(lm_weight), pop_limit_(pop_limit), nbest_(nbest) {} - const Weights &GetWeights() const { return weights_; } + Score LMWeight() const { return lm_weight_; } unsigned int PopLimit() const { return pop_limit_; } + const NBestConfig &GetNBest() const { return nbest_; } + private: - Weights weights_; + Score lm_weight_; + unsigned int pop_limit_; + + NBestConfig nbest_; }; } // namespace search |