ALCDataset
- class mowl.datasets.ALCDataset(ontology, dataset, device='cpu')[source]
Bases:
object
This class provides data-related methods to work with \(\mathcal{ALC}\) description logic language.
In general, it receives an ontology, groups axioms by similar patterns and returns a
torch.utils.data.Dataset
. In the process, the classes and object properties names are mapped to an integer values to create the datasets and the corresponding dictionaries can be input or created from scratch.Warning
This class is on development.
- Parameters:
ontology (
org.semanticweb.owlapi.model.OWLOntology
) – Input ontologyclass_index_dict (dict, optional) – Dictionary containing information class name –> index. If not provided, a dictionary will be created from the ontology classes. Defaults to
None
.object_property_index_dict (dict, optional) – Dictionary containing information object property name –> index. If not provided, a dictionary will be created from the ontology object properties. Defaults to
None
.
Attributes Summary
Returns a dictionary with grouped axioms where keys are axiom patterns and the values are lists of correspoding axioms for the patterns
Methods Summary
get_axiom_pattern
(axiom)get_axiom_vector
(axiom)Returns a dictionary containing the name of the axiom pattern as keys and the corresponding TensorDatasets as values.
load
()Attributes Documentation
- class_to_id
- grouped_axioms
Returns a dictionary with grouped axioms where keys are axiom patterns and the values are lists of correspoding axioms for the patterns
- individual_to_id
- object_property_to_id
Methods Documentation