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 spdx_lid::spdx_lid_match;pub use unknown_match::unknown_match;
Modules§
- aho_
match - Aho-Corasick exact matching for license detection.
- automaton
- Aho-Corasick automaton wrapper using daachorse.
- embedded
- 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.
- 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 Engine - License detection engine that orchestrates the detection pipeline.
- Position
Set - A set of usize positions stored as a BitSet. Provides O(1) membership testing and efficient set operations. Caches bounds for cheap overlap pre-checks.
- Token
Multiset - A multiset of token IDs stored as token -> occurrence count.
- Token
Set - A set of token IDs stored as a sorted SmallVec.
Constants§
- DEFAULT_
LICENSEDB_ URL_ TEMPLATE - 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§
- filter_
invalid_ contained_ unknown_ matches - Filter unknown matches contained within good matches’ qregion.
- merge_
overlapping_ matches - Merge overlapping and adjacent matches for the same rule.
- refine_
matches - Main refinement function - applies all refinement operations to match results.
- refine_
matches_ without_ false_ positive_ filter - Initial refinement without false positive filtering.
- split_
weak_ matches - Split matches into good and weak matches.