Expand description
SMILES-based functional group detection and chapter-level HS classification.
This module provides a pattern-matching engine that inspects a canonical SMILES string and infers:
- Organic vs. inorganic classification
- Functional groups present (up to 20 categories)
- HS chapter / heading hint (approximate, confidence ≤ 0.70)
The engine is used as Priority 3 in HsPipeline::classify when the CAS
rule table (Priority 2) finds no match but a SMILES string is available.
§Example
use hs_predict::smiles::classify_smiles;
use hs_predict::smiles::detector::FunctionalGroup;
let result = classify_smiles("CC(C)=O").unwrap(); // acetone
assert_eq!(result.heading_hint.heading, Some(2914)); // ketone → 29.14Re-exports§
pub use chapter_map::HeadingHint;pub use detector::FunctionalGroup;
Modules§
- chapter_
map - Maps detected functional groups to HS chapter / heading hints.
- detector
- Organic / inorganic detection and functional group detection from SMILES.
Structs§
- Smiles
Classification - Result of SMILES-based functional group analysis and HS heading estimation.
Functions§
- classify_
smiles - Analyse a SMILES string and return a chapter-level HS classification hint.