Open monsterkrampe opened 3 years ago
I was now able to reproduce the behavior using http://krr-nas.cs.ox.ac.uk/ontologies/UID/00512.owl
I used part of the ontology to construct a smaller example:
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.cs.ox.ac.uk/isg/ontologies/UID/00512.owl#"
xml:base="http://www.cs.ox.ac.uk/isg/ontologies/UID/00512.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:lipidversion3="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about="http://www.cs.ox.ac.uk/isg/ontologies/UID/00512.owl"/>
<owl:Class rdf:about="TestPart">
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Alcohol"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Aldehyde"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Alkenyl_Group"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid_Amide_Group"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid_Ester_Group"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Ether"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Ketone"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Methyl"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Phosphate_Group"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Prenyl"/>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Isoprene_Chain"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Monocyclic_Terpenoid"/>
<rdf:Description rdf:about="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Polycyclic_Terpenoid"/>
</owl:unionOf>
</owl:Class>
</owl:unionOf>
</owl:Class>
</rdf:RDF>
This part produces the following normalizer output:
<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Declaration>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Methyl"/>
</Declaration>
<...>
<SubClassOf>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Alcohol"/>
<Class IRI="http://www.cs.ox.ac.uk/isg/ontologies/UID/TestPart"/>
</SubClassOf>
<...>
<SubClassOf>
<Class IRI="http://www.cs.ox.ac.uk/isg/ontologies/UID/TestPart"/>
<ObjectUnionOf>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Alcohol"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Aldehyde"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Alkenyl_Group"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid_Amide_Group"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Carboxylic_Acid_Ester_Group"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Ether"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Ketone"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Methyl"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Phosphate_Group"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Prenyl"/>
<ObjectUnionOf>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Isoprene_Chain"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Monocyclic_Terpenoid"/>
<Class IRI="http://NUS.I2R.lipidontology.biochem.nus.edu.sg/lipidversion3.owl#Polycyclic_Terpenoid"/>
</ObjectUnionOf>
</ObjectUnionOf>
</SubClassOf>
</Ontology>
<!-- Generated by the OWL API (version 5.1.3) https://github.com/owlcs/owlapi/ -->
The nested union already exists in the non-normalized ontology so it does not seem to be introduced by the normalizer itself. Maybe it would still be good if the normalizer flattened it but this is merely a design choice.
I assume that the case for nested intersections is similar.
Hi *,
recently, @dcarralma provided me with some normalized ontologies that were produces using this normalizer.
In some cases, for subclass axioms the normalizer produces nestes intersections on the subclass side and nested unions on the superclass side.
Here are some examples for the output:
(filename:
37-0ad7499f-300b-461b-93ea-223aec64f71f_chemistryv8.owl.owl.xml
)(filename:
111-6ac35b9a-a6b8-4ae1-b321-4fcd42f1d176_relontor.owl.owl.xml
)Unfortunately, I do not know how the corresponding inputs looked like but maybe @dcarralma can figure this out given the filenames.
Note that this is not an urgent issue. We have been discussing it and just want to keep track of it here :)