Skip to content

Commit 0b97ee3

Browse files
committed
Add explanation for relevance attribute in license rule documentation
1 parent 7dbb3c7 commit 0b97ee3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/source/explanation/scancode-license-detection-updates.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,20 @@ I.e. the identifier is a `RULE` or a `LICENSE` file.
527527
Example: ``apache-2.0_2.RULE``
528528

529529
Other attributes are it's license-expression, the boolean fields, length, relevance etc.
530+
Relevance
531+
---------
532+
533+
The `relevance` attribute represents the importance of a rule when detecting
534+
licenses. It acts as a scoring mechanism that helps ScanCode prioritize stronger
535+
matches over weaker ones.
536+
537+
Rules with higher relevance values indicate stronger evidence that the matched
538+
text corresponds to a specific license. For example, rules matching the main
539+
license text usually have higher relevance, while rules matching smaller license
540+
references or fragments may have lower values.
541+
542+
This scoring helps ScanCode select the most accurate license detection when
543+
multiple rules match the same piece of text.
530544

531545

532546
CLI option

0 commit comments

Comments
 (0)