unibz-core / Scior

Identification of ontological categories for OWL ontologies.
https://purl.org/scior
Apache License 2.0
3 stars 1 forks source link

Simplification of hashing function #26

Closed pedropaulofb closed 1 year ago

pedropaulofb commented 1 year ago

The hashing is an important part of the rules’ execution process, as its resulting value is used to verify if the rules performed modifications on the processed data. The data structure OntCatOWL uses for creating the hash is the ontology_dataclass_list.

We do not use default hashing function for creating this hash value, instead we simply concatenate the hashes of all its composing elements, the dataclasses. Similarly, the dataclasses’ hashes are the concatenation of the elements’ strings of all their internal lists.

However, it would be better to use a default hash function. This would simplify the process and reduce the chance of errors.

For the implementation, check: https://stackoverflow.com/questions/49732225/calculate-hash-of-object-python

pedropaulofb commented 1 year ago

After implementing this, we must update the respective documentation here.

pedropaulofb commented 1 year ago

This is unnecessary. We're using an unhashable type (list).