feat(iace): 25 new robot cell patterns (HP1650-HP1697) + matcher fix
New patterns from GT benchmark gap analysis: - HP1650-1655: Robot arm motion limit, restart safety, tool/workpiece crushing, workpiece penetrates fence, reaching over fence - HP1660-1661: Centering gripper crushing (outside/inside cell) - HP1665-1666: Machine tool loading door, machining workspace - HP1670-1671: Coolant splash eyes, compressed air injury - HP1675: Coolant hose burst/detachment - HP1680: Workpiece/tunnel crushing at conveyor - HP1685-1689: Indirect contact, cabinet contact, liquid ingress fire, potential differences, RCD socket protection - HP1690-1691: Ergonomic loading/control position - HP1695: Burns from hot workpieces - HP1697: Machine collapse through floor Matcher: keyword overlap penalty — matches without shared hazard-type keywords AND low zone score get 0.5x penalty to prevent false matches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -217,10 +217,17 @@ func fuzzyMatchScore(gt *GroundTruthEntry, h *Hazard) (float64, string) {
|
||||
// Penalty: if engine hazard mentions a machine-specific term not in the GT context,
|
||||
// it's likely a wrong-machine match (e.g. "Spielplatz" for a robot cell GT entry)
|
||||
if hasWrongMachineTerm(h.Name, h.Scenario, gt.HazardCause, gt.ComponentZone) {
|
||||
score *= 0.3 // Heavy penalty
|
||||
score *= 0.3
|
||||
reasons = append(reasons, "Strafabzug:FremdMaschine")
|
||||
}
|
||||
|
||||
// Minimum keyword overlap required: if GT and Engine share no hazard-type
|
||||
// keywords at all, the match is unreliable regardless of category/zone score
|
||||
if kwScore == 0 && zoneScore < 0.5 {
|
||||
score *= 0.5
|
||||
reasons = append(reasons, "Strafabzug:KeineKeywords")
|
||||
}
|
||||
|
||||
return score, strings.Join(reasons, "+")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user