summaryrefslogtreecommitdiff
path: root/klm/search/config.hh
blob: ba18c09e973389bdad89264237cd7cd1e6d6c29f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef SEARCH_CONFIG__
#define SEARCH_CONFIG__

#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(Score lm_weight, unsigned int pop_limit, const NBestConfig &nbest) :
      lm_weight_(lm_weight), pop_limit_(pop_limit), nbest_(nbest) {}

    Score LMWeight() const { return lm_weight_; }

    unsigned int PopLimit() const { return pop_limit_; }

    const NBestConfig &GetNBest() const { return nbest_; }

  private:
    Score lm_weight_;

    unsigned int pop_limit_;

    NBestConfig nbest_;
};

} // namespace search

#endif // SEARCH_CONFIG__