Add script to predict and mark required phrases in license rules - #5262
Open
Kaushik-Kumar-CEG wants to merge 1 commit into
Open
Add script to predict and mark required phrases in license rules#5262Kaushik-Kumar-CEG wants to merge 1 commit into
Kaushik-Kumar-CEG wants to merge 1 commit into
Conversation
Kaushik-Kumar-CEG
force-pushed
the
gsoc/inject-ml-phrases
branch
from
August 9, 2026 13:32
7d37348 to
82cca13
Compare
Kaushik-Kumar-CEG
marked this pull request as draft
August 9, 2026 16:25
Kaushik-Kumar-CEG
force-pushed
the
gsoc/inject-ml-phrases
branch
from
September 7, 2026 13:31
dd74fa6 to
52cbf24
Compare
Kaushik-Kumar-CEG
marked this pull request as ready for review
September 7, 2026 13:40
Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>
Kaushik-Kumar-CEG
force-pushed
the
gsoc/inject-ml-phrases
branch
from
September 7, 2026 13:44
52cbf24 to
f506f93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5243. Depends on #5222.
Adds a command that loads the hardened required phrase model, predicts BIOES spans for eligible license rules, validates the candidates with ScanCode's existing helpers, and marks accepted phrases with
{{ }}.The command:
ml_modelas the phrase sourceValidation:
git diff --checkpassAn installable package version is also available in
scancode-required-phraseson branchgsoc/prediction-injection. It includes theadd-model-required-phrasesentry point, tests, and documentation. Its complete test suite passes with 185 tests, and its documentation and distributions build successfully.The license index must be rebuilt after writing rules
disclosure : used Claude to help review and clean up few bugs in script