Ontology Pruning
OntologyPruner(onto)
Class for in-place ontology pruning.
Attributes:
Name | Type | Description |
---|---|---|
onto |
Ontology
|
The input ontology to be pruned. Note that the pruning process is in-place. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
onto |
Ontology
|
The input ontology to be pruned. Note that the pruning process is in-place. |
required |
Source code in src/deeponto/onto/pruning.py
33 34 35 36 37 38 39 40 |
|
save_onto(save_path)
Save the pruned ontology file to the given path.
Source code in src/deeponto/onto/pruning.py
42 43 44 45 46 |
|
prune(class_iris_to_be_removed)
Apply ontology pruning while preserving the relevant hierarchy.
paper
This refers to the ontology pruning algorithm introduced in the paper: Machine Learning-Friendly Biomedical Datasets for Equivalence and Subsumption Ontology Matching (ISWC 2022).
For each class \(c\) to be pruned, subsumption axioms will be created between \(c\)'s parents and children so as to preserve the relevant hierarchy.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
class_iris_to_be_removed |
list[str]
|
Classes with IRIs in this list will be pruned and the relevant hierarchy will be repaired. |
required |
Source code in src/deeponto/onto/pruning.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
Created: April 19, 2023