correction: delegate hasNodeLevelUserSupport to rawAnswerSupportsUnclassifiedMeaning
v0.15 duplicated the overlap helper logic in hasNodeLevelUserSupport with reversed argument orientation (unknownText as source, userSupportedMeaning as candidate) compared to rawAnswerSupportsUnclassifiedMeaning (USM as source, unknownText as candidate). This produced different accept/reject outcomes when the two texts have very different token counts. The fix replaces the independent reconstruction with a single call to the canonical helper, ensuring node-level and answer-meaning alignment use identical semantics. Four boundary regression tests verify: - Boundary A: overlap ratio < 0.4 but >= 3 shared tokens → accept (token rule) - Boundary B: short candidate / long source accepted via structural linkage - Boundary B control: unrelated unknown rejected with no structural edge - Boundary C: ratio exactly at 0.4 threshold accepts via ratio rule
This commit is contained in:
@@ -92,12 +92,7 @@ function validateAddedUnknowns(graph, proposal, answerMeaning) {
|
||||
.join(" "),
|
||||
);
|
||||
|
||||
const overlapRatio = semanticOverlapRatio(userSupportedMeaningText, unknownText);
|
||||
const overlappingTokens = semanticContentTokens(userSupportedMeaningText).filter(
|
||||
(token) => semanticContentTokens(unknownText).includes(token),
|
||||
).length;
|
||||
|
||||
return overlapRatio >= 0.4 || overlappingTokens >= 3;
|
||||
return rawAnswerSupportsUnclassifiedMeaning(userSupportedMeaningText, unknownText);
|
||||
}
|
||||
|
||||
if (addedUnknowns.length > 3) {
|
||||
|
||||
Reference in New Issue
Block a user