summaryrefslogtreecommitdiff
path: root/klm/lm/virtual_interface.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-18 23:24:01 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-18 23:24:01 +0000
commitde379496ee411993dff94e52f393f6e19437a204 (patch)
treea3fdb3b299100384e0a82dd2bc424fd52177d411 /klm/lm/virtual_interface.cc
parent08ff0e0332b562dd9c1f36fce24439db81287c68 (diff)
kenneth's LM preliminary integration
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@681 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'klm/lm/virtual_interface.cc')
-rw-r--r--klm/lm/virtual_interface.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/klm/lm/virtual_interface.cc b/klm/lm/virtual_interface.cc
new file mode 100644
index 00000000..9c7151f9
--- /dev/null
+++ b/klm/lm/virtual_interface.cc
@@ -0,0 +1,22 @@
+#include "lm/virtual_interface.hh"
+
+#include "lm/exception.hh"
+
+namespace lm {
+namespace base {
+
+Vocabulary::~Vocabulary() {}
+
+void Vocabulary::SetSpecial(WordIndex begin_sentence, WordIndex end_sentence, WordIndex not_found, WordIndex available) {
+ begin_sentence_ = begin_sentence;
+ end_sentence_ = end_sentence;
+ not_found_ = not_found;
+ available_ = available;
+ if (begin_sentence_ == not_found_) throw SpecialWordMissingException("<s>");
+ if (end_sentence_ == not_found_) throw SpecialWordMissingException("</s>");
+}
+
+Model::~Model() {}
+
+} // namespace base
+} // namespace lm