protegeproject/cellfie-plugin

Class and Individual has same names ALSO two individual of different class has same name

Opened this issue · 4 comments

Getting error "The entity XYZ was found a [Class] in the ontology but was mentioned as [Individual] in the transformation rule.

I am able to create individual (same name as class) in protege but unable to import through cellfie. I have specified IRI to have a difference between Class & Individual name.

Active Ontology http://www.XYZ.org/semanticweb/ontologies
Class http://www.XYZ.org/semanticweb/ontologies/ClusterDatamodel
Individual http://www.XYZ.org/semanticweb/ontologies/ClusterDatamodel#XYZ

@can you send us your rule file, and maybe also a sample ontology where this occurs?

Hi,

I am attaching excel having Concept & Individual details and presentation having screenshots where it's failing in Cellfie but able to create using Protege UI. Copied the Rules below:

cellfie-plugin_Issue-122.xlsx

cellfie-plugin_Issue-122.pptx

Rules:
{"Collections":[{"sheetName":"ClusterDatamodelIndividual","startColumn":"A","endColumn":"A","startRow":"2","endRow":"+","comment":"","rule":"Individual: @C*\nAnnotations: rdfs:label @b*\nAnnotations: rdfs:comment @d*\nTypes: @A*","active":true},{"sheetName":"Concept","startColumn":"A","endColumn":"A","startRow":"2","endRow":"+","comment":"","rule":"Class: @A*\nAnnotations: rdfs:label @b*","active":true}]}

Thank you for sending this @PS051279 . I would have definitely not been able to reproduce this complicated scenario only from reading your original post. However, with the files and rules you sent (please see the rules file I generated from your previous comment - feel free to remove the .txt extension, for better handling), I was able to reproduce the problem.

Obviously Cellfie/MappingMaster can get confused with punned entities. The interesting thing is that I can run the rules once, the first time, when the ontology does not contain neither the Function class or the Function individual. So, I am able to create punned entities with Cellfie (which was a pleasant surprise). However, if I try to run the rules the second time, and I want to refer to the individual Function in a rule (while both the class and the individual with the same name already exist), Cellfie will give the error message you reported.

I'll have to take a deeper look at what is going on and consult with @martinjoconnor and/or @johardi, to see if and when we can fix this. I remember that this behaviour was brought to my attention a long time ago, and there did not seem to be an easy way to fix it, but we will take another look at it.

Until then, what I can recommend is to run all your rules at once, on a clean ontology, if it is feasable. If you need to experiment, and run your rules multiple times, to get them right, you can always undo (Edit ->Undo or CTRL+Z) the effect of the last Cellfie import, just like any other user operation in Protege.

Thanks for update, I hope we will get the solution soon.
The suggested alternative will not work in our case because we need to set different IRI before importing the data.

When we are loading Concepts(Class), we are choosing Active Ontology IRI but when we are loading Individual we are choosing Specified IRI in new entry option. Is there any way to provide IRI in excel itself instead of Protege set it for us?