Skip to content

Commit 73fcff2

Browse files
committed
fix: remove unused weightForPattern function from scoring
1 parent b1b7388 commit 73fcff2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

detector/scoring.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ var detectorWeights = map[string]float64{
2323

2424
const defaultWeight = 0.70
2525

26-
// weightForPattern returns the weight for a detected pattern based on its type prefix.
27-
// Pattern types follow the format "category_subtype" (e.g. "role_injection_special_token").
28-
func weightForPattern(patternType string) float64 {
29-
for category, weight := range detectorWeights {
30-
if strings.HasPrefix(patternType, category) {
31-
return weight
32-
}
33-
}
34-
return defaultWeight
35-
}
36-
3726
// computeWeightedScore replaces the old "max + 0.1 bonus" algorithm.
3827
//
3928
// Formula: final = min(Σ(score_i × weight_i), 1.0)

0 commit comments

Comments
 (0)