summaryrefslogtreecommitdiff
path: root/klm/search/config.hh
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-09-11 14:30:16 +0100
committerKenneth Heafield <github@kheafield.com>2012-09-11 14:31:42 +0100
commit45c9efc7d558dbe160056f02e74df1fee5d2d0e5 (patch)
tree0c26a847b78b4c0d86507b21b7338beb98ff1e73 /klm/search/config.hh
parent8882e9ebe158aef382bb5544559ef7f2a553db62 (diff)
Add search library to cdec (not used yet)
Diffstat (limited to 'klm/search/config.hh')
-rw-r--r--klm/search/config.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/klm/search/config.hh b/klm/search/config.hh
new file mode 100644
index 00000000..e21e4b7c
--- /dev/null
+++ b/klm/search/config.hh
@@ -0,0 +1,25 @@
+#ifndef SEARCH_CONFIG__
+#define SEARCH_CONFIG__
+
+#include "search/weights.hh"
+#include "util/string_piece.hh"
+
+namespace search {
+
+class Config {
+ public:
+ Config(StringPiece weight_str, unsigned int pop_limit) :
+ weights_(weight_str), pop_limit_(pop_limit) {}
+
+ const Weights &GetWeights() const { return weights_; }
+
+ unsigned int PopLimit() const { return pop_limit_; }
+
+ private:
+ search::Weights weights_;
+ unsigned int pop_limit_;
+};
+
+} // namespace search
+
+#endif // SEARCH_CONFIG__