Expand description
License Detection Engine
Re-exports§
pub use models::LicenseMatch;pub use aho_match::aho_match;pub use hash_match::hash_match;pub use seq_match::MAX_NEAR_DUPE_CANDIDATES;pub use seq_match::compute_candidates_with_msets;pub use seq_match::seq_match_with_candidates;pub use spdx_lid::spdx_lid_match;pub use unknown_match::unknown_match;
Modules§
- aho_
match - Aho-Corasick exact matching for license detection.
- embedded
- Embedded license index loading.
- expression
- License expression parsing and manipulation.
- hash_
match - Hash-based exact matching for license detection.
- index
- License index construction and querying.
- models
- Core data structures for license detection.
- query
- Query processing - tokenized input for license matching.
- rules
- Rule loading and orchestration.
- seq_
match - Approximate sequence matching for license detection.
- spans
- Span - efficient integer range sets.
- spdx_
lid - SPDX-License-Identifier detection and parsing.
- spdx_
mapping - SPDX license key mapping for license expressions.
- tokenize
- Text tokenization and normalization.
- unknown_
match - Unknown license detection using ngram matching.
Structs§
- License
Detection - A LicenseDetection combines one or more LicenseMatch objects using various rules and heuristics.
- License
Detection Engine - License detection engine that orchestrates the detection pipeline.
Constants§
- SCANCODE_
LICENSES_ DATA_ PATH - Path to the license data directory in the reference scancode-toolkit submodule. Used by test code and the xtask generate-license-loader-artifact binary.
- SCANCODE_
LICENSES_ LICENSES_ PATH - Path to the licenses directory in the reference scancode-toolkit submodule. Used by test code and the xtask generate-license-loader-artifact binary.
- SCANCODE_
LICENSES_ RULES_ PATH - Path to the license rules directory in the reference scancode-toolkit submodule. Used by test code and the xtask generate-license-loader-artifact binary.
Functions§
- create_
detection_ from_ group - Create a basic LicenseDetection from a DetectionGroup.
- filter_
invalid_ contained_ unknown_ matches - Filter unknown matches contained within good matches’ qregion.
- group_
matches_ by_ region - merge_
overlapping_ matches - Merge overlapping and adjacent matches for the same rule.
- post_
process_ detections - Main post-processing function for detections.
- refine_
matches - Main refinement function - applies all refinement operations to match results.
- refine_
matches_ without_ false_ positive_ filter - Initial refinement without false positive filtering.
- sort_
matches_ by_ line - Sort matches by start token position with tie-breaking criteria.
- split_
weak_ matches - Split matches into good and weak matches.