Skip to content

Add model-predicted required phrases to sample rules - #5330

Open
Kaushik-Kumar-CEG wants to merge 1 commit into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/model-required-phrases-evidence
Open

Kaushik-Kumar-CEG wants to merge 1 commit into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/model-required-phrases-evidence

Conversation

@Kaushik-Kumar-CEG

@Kaushik-Kumar-CEG Kaushik-Kumar-CEG commented Sep 21, 2026 •

Copy link
Copy Markdown

adds reviewed required phrases to ten ScanCode rules using the published model

I fixed a varied set of 30 eligible, unmarked rules before prediction. The set included common licenses, less common licenses, exceptions, composites and longer notices. None of the rules matched the final train, validation or test data

The model returned predictions for 22 rules.I kept ten clear phrases

Changes

  • agpl-3.0-plus_82.RULE: agpl 3plus identifies the AGPL versioned tag.
  • apache-2.0_501.RULE: Apache Licence anchors the short Apache notice.
  • cc-by-nc-nd-2.0_23.RULE: the full title and version distinguish this CC variant.
  • cc-by-sa-4.0_68.RULE: the variant and version identify CC BY-SA 4.0.
  • cpol-1.02_10.RULE: the full name and version identify CPOL 1.02.
  • etalab-2.0_3.RULE: the French title and version identify Etalab 2.0.
  • gpl-2.0_with_gcc-linking-exception-2.0_1.RULE: the phrase includes both GPL 2.0 and the GCC exception.
  • gpl-3.0-plus_230.RULE: the phrase includes GPL v3 and the later-version option.
  • lgpl-2.1-plus_167.RULE: the phrase includes LGPL 2.1 and the later-version option.
  • postgresql_25.RULE: the clause ties modifications to the PostgreSQL license terms.

Each diff only adds source: ml_model and the reviewed {{...}} marker.

Validation

  • all ten updated rules passed ScanCode rule validation;
  • all ten kept their expected full-text match;
  • text without the required phrase did not match the updated rule;
  • file modes and line endings were preserved;
  • required-phrase tests passed;
  • git diff --check passed.

Prediction command:

add-model-required-phrases --rules-dir copied-rules --predict-only --json predictions.json

Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant