2010-09-28 20:26:55 +04:00
|
|
|
#include "lm/virtual_interface.hh"
|
|
|
|
#include "lm/lm_exception.hh"
|
2010-09-10 04:36:07 +04:00
|
|
|
|
|
|
|
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;
|
2010-09-15 01:33:11 +04:00
|
|
|
if (begin_sentence_ == not_found_) throw SpecialWordMissingException("<s>");
|
|
|
|
if (end_sentence_ == not_found_) throw SpecialWordMissingException("</s>");
|
2010-09-10 04:36:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
Model::~Model() {}
|
|
|
|
|
|
|
|
} // namespace base
|
|
|
|
} // namespace lm
|