From 1b673f603d0afbe7e78766aa8d4540bd4e730e2d Mon Sep 17 00:00:00 2001 From: rjawor Date: Tue, 21 May 2019 12:33:08 +0200 Subject: [PATCH] debug --- concordia-server/unit_dao.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/concordia-server/unit_dao.cpp b/concordia-server/unit_dao.cpp index 2ec1a12..ab98a97 100644 --- a/concordia-server/unit_dao.cpp +++ b/concordia-server/unit_dao.cpp @@ -199,16 +199,20 @@ ExampleOccurrence UnitDAO::_getExampleOccurrence(DBconnection & connection, cons BOOST_FOREACH (QueryParam * param, params) { delete param; } + Logger::log("params deleted"); std::vector targetTokens = _getArray(targetTokensRaw); std::vector > alignments = _get2DArray(alignmentsRaw); + Logger::log("arrays got"); + std::set matchedTargetTokens; for(int sourceTokenIndex = sOccurrence.getOffset(); sourceTokenIndex < sOccurrence.getOffset()+matchedLength; sourceTokenIndex++) { BOOST_FOREACH(int & targetTokenIndex, alignments.at(sourceTokenIndex)) { matchedTargetTokens.insert(targetTokenIndex); } } + Logger::log("matched target tokens computed"); int prevPos = -2; int currStart = -1; @@ -232,12 +236,15 @@ ExampleOccurrence UnitDAO::_getExampleOccurrence(DBconnection & connection, cons prevPos = targetPos; } + Logger::log("matched target tokens added"); // check if there are remaining fragments if (currStart >= 0) { occurrence.addMatchedTargetFragment(std::pair(currStart,currEnd)); } + Logger::log("getFullSearchResult done"); + return occurrence; }