Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a conversion problem with the oeo-full.owl file #1424

Closed
1 task done
areleu opened this issue Nov 27, 2022 · 11 comments
Closed
1 task done

There is a conversion problem with the oeo-full.owl file #1424

areleu opened this issue Nov 27, 2022 · 11 comments
Assignees
Labels
oeo dev meeting Discuss issue at oeo dev meeting

Comments

@areleu
Copy link
Contributor

areleu commented Nov 27, 2022

Description of the issue

I just noticed there is a problem with the oeo-full.owl file. Apparently some axioms are not being converted properly making it not possible to parse the ontology with robot. The file seems to be working fine with Protégé. Here is an example command:

 robot convert --input build/oeo/1.12.0/oeo-full.owl --output oeo-full-round.omn --format omn
ERROR Input ontology contains 18 triple(s) that could not be parsed:
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010125> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486222.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010203> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486241.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010203> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486242.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010202> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486237.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010202> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486238.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010230> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486256.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010122> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486220.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010205> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486245.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010205> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486246.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010228> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486254.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010200> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486230.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010199> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486225.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010199> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486226.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010229> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486255.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010124> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486221.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010201> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486233.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010201> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486234.
 - <http://openenergy-platform.org/ontology/oeo/OEO_00010200> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147486229.

Ideas of solution

Probably one has to take a look at the make scripts

  • Remove all quantifiers from individual type axioms

    • Make the has memo item property part of a subclass of sector which is instantiated by all its users. sector with memo?
    • Turn Effort sharing regulation into a subclass of effort sharing with axiom uses Annual Emission Allocation`
    • Add new subclass of policy instrument with axiom uses some Allowance and instantiate European Union Emission Trading System from that.

Workflow checklist

  • I am aware of the workflow for this repository
@areleu areleu added the To do Issues that haven't got discussed yet label Nov 27, 2022
@areleu
Copy link
Contributor Author

areleu commented Nov 27, 2022

I noticed it is something to do with instance types:

        <rdf:type>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://openenergy-platform.org/ontology/oeo/OEO_00010232"/>
                <owl:someValuesFrom rdf:resource="http://openenergy-platform.org/ontology/oeo/OEO_00010227"/>
            </owl:Restriction>
        </rdf:type>
        <rdf:type>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://openenergy-platform.org/ontology/oeo/OEO_00010232"/>
                <owl:someValuesFrom rdf:resource="http://openenergy-platform.org/ontology/oeo/OEO_00010227"/>
            </owl:Restriction>
        </rdf:type>

@areleu
Copy link
Contributor Author

areleu commented Nov 27, 2022

This happens to every Instance Type axiom where there is multiple classes with (existential? probably universal too) quantifiers. The parser tries to make an anonymous node out of it then tries to associate it to the class. Is that even allowed? to have quantifiers in the type of an instance? We have the properties: uses and has memo item associated to the Type of the instance. Shouldn't these properties be associated to the instance itself?

@areleu
Copy link
Contributor Author

areleu commented Nov 27, 2022

Since this seems to be allowed by Robot in Manchester Syntax, i suspect this is a robot bug.
Edit: I tried looking for a clarification in the OWL docu but I can't find anything. My gut feeling tells me that Quantifiers can't be part of a rdf:type axiom but I request @OpenEnergyPlatform/oeo-general-expert-formal-ontology to prove it wrong.

@github-actions github-actions bot removed the To do Issues that haven't got discussed yet label Nov 27, 2022
@areleu areleu changed the title There is a conversion with the oeo-full.owl file There is a conversion problem with the oeo-full.owl file Nov 27, 2022
@l-emele
Copy link
Contributor

l-emele commented Nov 28, 2022

Before changing anything, we should check whether oeo-full.owl is created correctly.

@areleu
Copy link
Contributor Author

areleu commented Nov 28, 2022

Before changing anything, we should check whether oeo-full.owl is created correctly.

What I have already tried is take oeo-social, where these instances are being defined and convert it to owl from protégé. Then I try to convert it back to omn with robot and I get the same error. So either, Protégé allows this axiom and it is illegal or the axiom is legal but robot is not able to parse it from an owl file.

@areleu
Copy link
Contributor Author

areleu commented Nov 29, 2022

I have been reading #858 and the implementation at #967 I think the issue has to be repoened.

My first idea of a solution was to do this:

  • memo item sector
    • SubClassOf sector
    • SubClassOf has memo item some memo item

memo item sector: A sector with exclusions is a sector with a subdivision excluded through a memo.

But everything broke apart when I tried to do the natural next step which is instantiating the memos themselves, which did not make sense from the context provided in the issue.

memo item is more of a binary property, a quality. But since the sectors are generically dependent continuant this is not something we can attach to them. I don't think the property belongs to this entity at all. Because the fact of a sector being just reported as a memo is independent of it being a sector or not.

The importance of the memo item arises when the sectors are being used in something like national inventory reports where some information associated to the sector is being accounted. In this context you can say that some quantity value reported is just extra information not being accounted towards some total value (Like CO2 emissions). For example in: https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-18

@areleu
Copy link
Contributor Author

areleu commented Nov 29, 2022

Here is an idea:

Create two new sub-properties of is defined by called

  • is reported sector of : A relation between a sector and a sector division which defines sector is being reported in sector division
    • is accounted sector of : A relation between a sector and a sector division which defines sector is being accounted in sector division

This makes sense because the sector being accounted or not is dependant on the framework that defines it in the first place.

Also is reported sector of entails is accounted sector of so the weird thinking process of something being accounted or not is no longer there as nothing is accounted towards anything unless explicitely said.

@areleu
Copy link
Contributor Author

areleu commented Nov 29, 2022

Class expressions are not in the range of rdf:type. Quoting the RDF Schema 1.1 reference:

The rdfs:domain of rdf:type is rdfs:Resource. The rdfs:range of rdf:type is rdfs:Class.

But the definitive confirmation of no quantifiers in type axioms to me is the bold part of this quote of the Owl2 Syntax Reference:

In OWL 2, classes and property expressions are used to construct class expressions, sometimes also called descriptions, and, in the description logic literature, complex concepts. Class expressions represent sets of individuals by formally specifying conditions on the individuals' properties; individuals satisfying these conditions are said to be instances of the respective class expressions. In the structural specification of OWL 2, class expressions are represented by ClassExpression.

@l-emele
Copy link
Contributor

l-emele commented Nov 29, 2022

We should discuss this issue in one of the next oeo dev meetings.

@l-emele l-emele added the oeo dev meeting Discuss issue at oeo dev meeting label Nov 29, 2022
@areleu
Copy link
Contributor Author

areleu commented Dec 1, 2022

Status from todays OEODEV: We need support from @OpenEnergyPlatform/oeo-general-expert-formal-ontology to formulate a definitive answer

@areleu
Copy link
Contributor Author

areleu commented May 22, 2023

This is no longer an issue in 1.14.0

@areleu areleu closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oeo dev meeting Discuss issue at oeo dev meeting
Projects
None yet
Development

No branches or pull requests

4 participants