summaryrefslogtreecommitdiff
path: root/klm/lm/virtual_interface.cc
blob: c5a64972b2f8f80d31a315bf1b0a3743c3d8dedb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "lm/virtual_interface.hh"

#include "lm/lm_exception.hh"

namespace lm {
namespace base {

Vocabulary::~Vocabulary() {}

void Vocabulary::SetSpecial(WordIndex begin_sentence, WordIndex end_sentence, WordIndex not_found) {
  begin_sentence_ = begin_sentence;
  end_sentence_ = end_sentence;
  not_found_ = not_found;
  if (begin_sentence_ == not_found_) throw SpecialWordMissingException("<s>");
  if (end_sentence_ == not_found_) throw SpecialWordMissingException("</s>");
}

Model::~Model() {}

} // namespace base
} // namespace lm