-
Notifications
You must be signed in to change notification settings - Fork 0
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
Second Order Logic and updating neighbor entities #14
Comments
Exactly, and I believe this is what is already implemented. So when hasSon is encountered and analyzed, we consider it as a property having an inverse because it's parent prop has an inverse (i.e hasChild has an inverse: hasParent), while we ignore it or do not consider it has a SymetricProperty since we assume that there is no type inheritance for Properties. If the rule is really "no type inheritance for Properties" then there is no issue at all and we consider as a owl:SymmetricProperty only properties having that type explicitly defined in the ontology (ad for kinWith). PropA rdf:type owl:SymmetricProperty But owl:SymmetricProperty a rdfs:Class ; so the type of PropB is a superClass of the type of PropA |
yes, the baseline is that there's no inheritance. Looking at RDF as if it was a programming language often leads to many confusion... (which I think is one of the reasons why RDF is not very adopted by programmers, it's counter-intuitive). So, no inheritance no problem! |
Trying to clarify this a little bit more, I would say that in our case : "we take inheritance into account when searching for inverse prop" which might be translated as : "inheritance is ok with a rdf:Property (owl:inverseOf a rdf:Property ;) " this is the only generic and rational way of thinking I found about this issue. |
no, we never take inheritance into account, not even for inverse props |
Right, we really don't care about inheritance when a reasoner already produced an inferred model containing "missing triples".
or when having:
Since I am not sure we approach this discussion using the same perspective, I describe below when this problem occurs in the actual process and what it might take to solve it:
This is where some inference or logic must be used so we have the means to figure out that hasSon actually has an inverseProp which is hasParent even though the triple There are at least two ways to do this (as shown above): A) keep the ontology as is and apply a reasoner on bdg:Resa, so we infer ReasA hasChild ResB (and then we can figure out the inverse prop since or B) apply a reasoner to the ontolgoy so it infers hasSon inverseOf HasParent. Does it make sense or am I completely off track ? |
well, in that case it's actually even more complex... because what we really want is
The reason is that for the |
I have noticed that most of the time, the inverse triples we need are already in ResB
We merge P705 and P2MS9526 and the resulting graph already contains (without inference) the following:
But at this point, we don't know a thing about bdo:hasChild or bdo:hasSon (i.e we don't know if they are inverseProps and nor if any of them (or both) correspond to the inverse of hasFather. So at this point we could solve the issue this way :
WDYT |
These triples are in https://gitlab.com/bdrc-data/persons/-/blob/master/3b/P2MS9526.trig The way it goes would be as follows: Initial state (on git)
Change received by the editorwe remove the triple
Inference stage for added triplesWhat we need to do here is something along the lines of:
(the rule with the funny syntax is there and is integrated in the reasoner). This algorithm is slightly simpler than the one I initially described but that should give you the idea. Inference stage for removed triplesFor removed triples things are a bit different. The initial graph has
the final graph doesn't have this triple. We run the inference on both the initial and the final graph. With the same algorithm as before, the initial graph will give
but the second graph will not. So by diffing the inference on the final graph and the inference on the initial graph, we can have the diff to apply to other graphs. Actually this is a generalization of the more simple case which could be handled in the exact same way... Do you see what I mean? |
Yes. But I suspect the two triples resulting from inference are |
you can try the BDRCReasoner and see, it should give both |
Fixed as of commit ee7cb0e |
When we receive an update from one entity, we need to sometimes update the links to this entity in other graphs. For instance if we have:
and we receive an update to
bdg:A
where thehasSon
triple is removed, we need to remove thehasFather
triple inbdg:B
. This issue is about the logics involved in what triple to remove.As a preliminary, it would be good to define a
minimal graph
which could be defined as the minimal number of triples necessary to obtain an inferred model. It will be discussed in a separate issue. This issue assumes that all the graphs we're dealing with are minimal.In our use cases, we can know what properties will be encountered in other graphs through different second order logic properties:
owl:SymmetricProperty
owl:inverseOf
If we have in the ontology
and
which is a coherent state, then:
bdr:IA bdo:PA bdr:IB .
we must remove/addbdr:IB bdo:PA bdr:IA .
bdr:IA bdo:PB bdr:IB .
we must remove/addbdr:IB bdo:PC bdr:IA .
There's actually no difficulty...
The text was updated successfully, but these errors were encountered: