semsynth.mappings

Functions

load_mapping_json(path)

Load and minimally validate a curated SemMap JSON-LD mapping.

normalize_jsonld_payload(payload)

Ensure mappings carry the canonical JSON-LD context.

resolve_mapping_json(dataset_spec)

Return the curated JSON-LD mapping path for the dataset if it exists.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

DatasetSpec(provider[, name, id, target, meta])

Container describing how to locate and identify a dataset.

Path(*args, **kwargs)

PurePath subclass that can make system calls.

semsynth.mappings.load_mapping_json(path: Path) Dict[str, Any]

Load and minimally validate a curated SemMap JSON-LD mapping.

semsynth.mappings.normalize_jsonld_payload(payload: Dict[str, Any]) Dict[str, Any]

Ensure mappings carry the canonical JSON-LD context.

semsynth.mappings.resolve_mapping_json(dataset_spec: DatasetSpec) Path | None

Return the curated JSON-LD mapping path for the dataset if it exists.