prefix path

This commit is contained in:
Hieu Hoang 2015-11-06 18:50:25 +00:00
parent 5ed810bf85
commit d793b2579b

View File

@ -20,8 +20,9 @@ void InputPaths::Init(const PhraseImpl &input, const System &system)
{
size_t numPt = system.mappings.size();
size_t size = input.GetSize();
for (size_t phaseSize = 1; phaseSize <= min(size, system.maxPhraseLength) ; ++phaseSize) {
//for (size_t phaseSize = 1; phaseSize <= size; ++phaseSize) {
size_t maxLength = min(size, system.maxPhraseLength);
for (size_t phaseSize = 1; phaseSize <= maxLength; ++phaseSize) {
for (size_t startPos = 0; startPos < size - phaseSize + 1; ++startPos) {
size_t endPos = startPos + phaseSize -1;