1 data_handling.ase_efm.semantics
data_handling.ase_efm.semantics
Normalize EFM semantic-id metadata for data and visualization consumers.
This module provides tolerant normalization of sparse mappings or legacy dense name sequences and a single class-name lookup with a numeric fallback. It owns presentation-facing canonicalization only; it does not remap stored semantic ids, infer categories, or define the dataset ontology.
Sparse mappings and legacy dense sequences are converted to one integer-keyed representation without treating unknown numeric ids as meaningful labels.
1.1 Attributes
| Name | Description |
|---|---|
| SemanticNameMap | Sparse mapping from EFM semantic id to human-readable class name. |
1.2 Functions
| Name | Description |
|---|---|
| normalize_semantic_name_map | Normalize raw EFM semantic-name metadata into a sparse id map. |
| semantic_class_name | Return a display class name for one EFM semantic id. |
1.2.1 normalize_semantic_name_map
data_handling.ase_efm.semantics.normalize_semantic_name_map(value)Normalize raw EFM semantic-name metadata into a sparse id map.
1.2.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| value | Mapping[object, object] | Sequence[object] | None | Raw semantic metadata from EFM, msgpack, or legacy dense lists. | required |
1.2.1.2 Returns
| Name | Type | Description |
|---|---|---|
| SemanticNameMap | None | Sparse {semantic_id: class_name} mapping, or None when missing. |
1.2.2 semantic_class_name
data_handling.ase_efm.semantics.semantic_class_name(sem_id, sem_id_to_name)Return a display class name for one EFM semantic id.