ELDataset

class mowl.datasets.ELDataset(ontology, class_index_dict=None, object_property_index_dict=None, extended=True, device='cpu')[source]

Bases: object

This class provides data-related methods to work with \(\mathcal{EL}\) description logic language. In general, it receives an ontology, normalizes it into 4 or 7 \(\mathcal{EL}\) normal forms and returns a torch.utils.data.Dataset per normal form. 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.

Parameters:
  • ontology (org.semanticweb.owlapi.model.OWLOntology) – Input ontology that will be normalized into \(\mathcal{EL}\) normal forms

  • extended (bool, optional) – If true, the normalization process will return 7 normal forms. If false, only 4 normal forms. See Embedding the EL language for more information. Defaults to True.

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

Returns indexed dictionary with class names present in the dataset.

gci0_bot_dataset

gci0_dataset

gci1_bot_dataset

gci1_dataset

gci2_dataset

gci3_bot_dataset

gci3_dataset

object_property_index_dict

Returns indexed dictionary with object property names present in the dataset.

Methods Summary

get_gci_datasets()

Returns a dictionary containing the name of the normal forms as keys and the corresponding datasets as values.

load()

Attributes Documentation

class_index_dict

Returns indexed dictionary with class names present in the dataset.

Return type:

dict

gci0_bot_dataset
gci0_dataset
gci1_bot_dataset
gci1_dataset
gci2_dataset
gci3_bot_dataset
gci3_dataset
object_property_index_dict

Returns indexed dictionary with object property names present in the dataset.

Return type:

dict

Methods Documentation

get_gci_datasets()[source]

Returns a dictionary containing the name of the normal forms as keys and the corresponding datasets as values. This method will return 7 datasets if the class parameter extended is True, otherwise it will return only 4 datasets.

Return type:

dict

load()[source]