SeMRA Source Registration

Register rdfsolve as a SeMRA source.

Importing this module (or calling register()) makes the key "rdfsolve_instance" available in semra.sources.SOURCE_RESOLVER. Once registered, the rdfsolve instance-matcher mappings can be used as inputs to any SeMRA pipeline:

from semra.sources import SOURCE_RESOLVER import rdfsolve.semra_source # triggers registration mappings = SOURCE_RESOLVER.lookup(“rdfsolve_instance”)()

The returned mappings are read from the JSON-LD files in docker/mappings/instance_matching/ (relative to the repository root discovered via importlib.resources / CWD fallback).

get_rdfsolve_instance_mappings(directory: str | None = None) list[Any][source]

Return rdfsolve instance-matcher mappings as semra Mappings.

Reads every *.jsonld file from directory (defaults to docker/mappings/instance_matching/), converts the edges via rdfsolve.semra_converter.rdfsolve_edges_to_semra(), and returns the flat list of semra.Mapping objects.

Parameters:

directory – Override the search directory (absolute path).

Returns:

List of semra.Mapping objects.

register(force: bool = False) None[source]

Register the rdfsolve_instance source with SeMRA’s resolver.

Safe to call multiple times - subsequent calls are no-ops unless force is True.

Parameters:

force – Re-register even if already registered.