bsie.lib package#

class bsie.lib.BSIE(pipeline: Pipeline, naming_policy: NamingPolicy, collect: Iterable[URI] | None = None, discard: Iterable[URI] | None = None)#

Bases: object

Extract triples from files.

Controls which predicates to extract (collect) and which to not extract (discard). Note that this only affects principal predicates not auxililary predicates like, e.g., tag labels.

from_file(path: URI, principals: Iterable[URI] | None = None) Iterator[Tuple[Node, URI, Any]]#

Produce triples for a given path. Limit to principals if given.

property principals: Iterator[URI]#

Return an iterator to the principal predicates.

property schema: Schema#

Return the BSIE schema.

class bsie.lib.PipelineBuilder(reader_builder: ReaderBuilder, extractor_builder: ExtractorBuilder)#

Bases: object

Build instances.

build() Pipeline#

Return a Pipeline instance.

ebuild: ExtractorBuilder#
rbuild: ReaderBuilder#