kroma.tasks.loader
Loaders
A loader returns a source graph, a target graph, and a list of alignments.
OntologyLoader
load() -> (source_graph, target_graph, alignments)
An alignment is (source, target, label). Each endpoint is a (label, uri) pair.
Source: loader.py.
CSV alignments
CsvAlignmentLoader(csv_paths, dataset="ncit-doid").load()
For ncit-doid, rows use src_code, src_ety, tgt_code, tgt_ety, tgt_cands, and score. Other datasets use source, source_uri, target, target_uri, and relation.
OWL
OwlOntologyLoader(owl_path).load()
This reads an OWL or RDF/XML file and builds the class hierarchy from rdfs:subClassOf, with synonyms from the annotation properties on each class.