debug
This commit is contained in:
parent
e77da2f479
commit
1b673f603d
@ -199,16 +199,20 @@ ExampleOccurrence UnitDAO::_getExampleOccurrence(DBconnection & connection, cons
|
||||
BOOST_FOREACH (QueryParam * param, params) {
|
||||
delete param;
|
||||
}
|
||||
Logger::log("params deleted");
|
||||
|
||||
std::vector<int> targetTokens = _getArray(targetTokensRaw);
|
||||
std::vector<std::vector<int> > alignments = _get2DArray(alignmentsRaw);
|
||||
|
||||
Logger::log("arrays got");
|
||||
|
||||
std::set<int> 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<int,int>(currStart,currEnd));
|
||||
}
|
||||
|
||||
Logger::log("getFullSearchResult done");
|
||||
|
||||
return occurrence;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user