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 ontology

  • class_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

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 Summary

get_axiom_pattern(axiom)

get_axiom_vector(axiom)

get_datasets()

Returns a dictionary containing the name of the axiom pattern as keys and the corresponding TensorDatasets as values.

get_grouped_axioms()

get_obj_prop_assertion_data()

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

get_axiom_pattern(axiom)[source]
get_axiom_vector(axiom)[source]
get_datasets()[source]

Returns a dictionary containing the name of the axiom pattern as keys and the corresponding TensorDatasets as values.

Return type:

dict

get_grouped_axioms()[source]
get_obj_prop_assertion_data()[source]
load()[source]