bsie.lib.pipeline module#

class bsie.lib.pipeline.Pipeline(ext2rdr: Dict[Extractor, Reader | None])#

Bases: object

Extraction pipeline to generate triples from files.

The Pipeline binds readers and extractors, and performs the necessary operations to produce triples from a file. It takes a best-effort approach to extract as many triples as possible. Errors during the extraction are passed over and reported to the log.

property principals: Iterator[Predicate]#

Return the principal predicates that can be extracted.

property schema: Schema#

Return the pipeline’s schema (combined from all extractors).

subschema(principals: Iterable[Predicate]) Schema#

Return the subset of the schema that supports the given principals.