concordia-library/concordia/example.cpp
rjawor e99eb77b28 anonymizing sentences
Former-commit-id: 5d8bd7e16258fda7c02a7cc0e1da589d73418f0d
2014-04-29 14:46:04 +02:00

18 lines
560 B
C++

#include "concordia/example.hpp"
Example::Example(const string & sentence, const SUFFIX_MARKER_TYPE & id)
throw(ConcordiaException):
_sentence(sentence),
_id(id) {
// check if the example id exceeds space
// reserved for it in the suffix marker
if (id >= (SUFFIX_MARKER_TYPE_MAX_VALUE+1) / SUFFIX_MARKER_DIVISOR) {
throw ConcordiaException("Example id too large.");
}
}
Example::~Example() {
}