From: cel t. <cel...@gm...> - 2013-01-08 09:26:42
|
Team Looks like there are two problems in SloppyPhraseScorer.cpp: 1) checkedRepeats doesn't get initialized in the constructor and has varying values upon entry into initPhrasePositions() -- noticed in the Debug vs Release mode. This is inherited from the Java code, which doesn't have this initialization either. Easily fixed by adding checkedRepeats = false; to the SloppyPhraseScorer constructor. 2) std::qsort(repeats, repeatsLen, sizeof(PhrasePositions*), comparePhrasePositions); For some reason, comparePhrasePosition is receiving (x,y) with unexpected (apparently random) values in the offset field. Unable to suggest a fix -- as a stopgap, just replaced std::qsort with std::sort -- as follows: std::sort(repeats, repeats + (repeatsLen-1), comparePhrasePositions); No idea if / how these changes will affect tests. Regards Celto |