Re: [protege-user] Question about OWL RDF-Based Semantics
Samson Tu <[email protected]>
| Newsgroups | gmane.comp.misc.ontology.protege.owl |
|---|---|
| Message-ID | <[email protected]> |
Steve is right that OWLAPI, when loading a file that includes statements like oslc:allowedValue a rdf:Property ; rdfs:isDefinedBy oslc: ; rdfs:label "allowedValue" ; rdfs:comment "Specifies the allowed values for a property (may be more than one).” . does not generate a oslc:allowedVallue annotation property. He posted the question on the OWLAPI mailing list, and the developers there seem to think that, because of OWL’s open-world assumption, OWLAPI shouldn’t assign an entity type to oslc:allowedValue. The consequence is that while the oslc:allowedVaue data is in memory and can be written out as annotations, it is invisible in Protégé because editing and viewing OWL statements are entity-based. A search for “allowedValue” in the OSLC ontology that contains the "oslc:allowedVAlue a rdf:Property" statements doesn’t have any hit. (The ontology contains a “allowedValues” rdf:Property that has a class as its domain, so the OWLAPI turns it into an OWL object property.) [PastedGraphic-1.tiff] I learned something new about Protégé! Samson On Jan 20, 2025, at 1:07 PM, Steve Vestal <[email protected]> wrote: That was my impression. However, I was mistaken in assuming as-best-as-possible would transform rdf:Property to owl:AnnotationProperty. Protege doesn't list those as Annotation properties, with or without reasoning. The original question was how to process an "OWL 2 Web Ontology Language RDF-Based Semantics (Second Edition)" ontology. With or without a reasoner turned on, Protege lists classes and individuals (I think courtesy of an OWLAPI transform) but not rdf:Properties. I'll check back with the people who are using that standard, which has a set of its own axiomatic triples. On 1/20/2025 1:47 PM, Samson Tu wrote: I don’t think the difference in your input/output example resulted from transformations described in the OWL 2 Web Ontology Language RDF-Based Semantics (Second Edition) document. When you load a file in Protégé, the OWLAPI attempts to interpret the file content as an OWL-2 ontology as best as possible. Because an rdf:Property is not an OWL construct, OWLAPI converts it into an OWL annotation property, as it doesn’t have the information to turn it into an object or data property. The output happens to transfer the comment triple to the beginning. It doesn’t mean that oslc:allowedValue is a comment. Samson On Jan 20, 2025, at 10:17 AM, Steve Vestal via protege-user <[email protected]><mailto:[email protected]> wrote: Here's another example. In the input file, here is a definition: oslc:allowedValue a rdf:Property ; rdfs:isDefinedBy oslc: ; rdfs:label "allowedValue" ; rdfs:comment "Specifies the allowed values for a property (may be more than one)." . If I load that file into Protege, do not turn on any reasoner, and then save it in another file, I find ################################################################# # Annotations ################################################################# oslc:allowedValue rdfs:comment "Specifies the allowed values for a property (may be more than one)." ; rdfs:isDefinedBy <http://open-services.net/ns/core#><http://open-services.net/ns/core#> ; rdfs:label "allowedValue" . I made a mistake in assuming Annotations would mean AnnotationProperty. I thought I had seen annotation properties in saved files. Apparently it just treats rdf:Property as an rdfs:comment. Life would be simpler and more dependable if all the ontologies out there were OWL2 DL ontologies, and all imports were URLs to the Authoritative Source of Truth. "The measure of a man is what he does with power. The measure of reality is how often it ignores him." (Plato) On 1/20/2025 11:39 AM, Michael DeBellis wrote: For example, the input file contained the statement oslc:Error a rdfs:Class ; but the saved file had the statement oslc:Error rdf:type owl:Class ; I'm guessing you had a file that you read in to Protege that had things defined using rdfs:Class? If so then my best guess is that Protege was just doing its best to translate that file into OWL format. owl:Class and rdfs:Class are not the same thing. In a Protege ontology you shouldn't be using rdfs:Class you should always use owl:Class. It has nothing to do with which profile you use. There is a profile (in theory) called OWL Full but IMO it should be called "OWL Don't Ever Use this Because if you do kiss any reasoning goodbye" but that's sort of a long name. The point being that OWL Full (actually, I think there is a different name for it now) is something that is almost never useful because it includes things that make it impossible to use a reasoner. I think the default profile is what used to be called OWL DL but is now just called OWL2: https://www.w3.org/TR/owl2-overview/#Profiles And the various profiles: https://www.w3.org/TR/owl2-profiles/ are for when you want to put limits on your use of OWL 2 in order to get faster reasoning. To my knowledge there is no way to do this automatically in Protege. I.e., it would be a nice to have feature where you could say "I just want to use OWL 2 QL" and Protege would know to exclude the appropriate kinds of axioms but I don't think that's possible and if you want to restrict yourself to a profile other than OWL 2 you need to know what to not include yourself. Although in my experience some reasoners (e.g., AllegroGraph) can still handle OWL models that include expressions that aren't included for performance reasons without a problem. They just ignore those axioms. That's another thing about OWL profiles. AllegroGraph and probably other triplestore vendors have their own subsets of OWL based on what they've found that their customers most need vs. performance of the reasoner. Their goal is to support very large graphs and still get acceptable reasoning performance. Regarding other parts of your question: I was aware that Protege (OWLAPI) does some modifications to the initial input in some cases. I'm not aware of this. I think Protege looks for certain triples that define the various prefixes, the name of the ontology, etc. and may create some default triples if it can't find them but otherwise it doesn't do any modification of the file. Are those modifications based on the RDF to DL transformations described in that standard? As I understand it, it is more appropriate to think of it the other way. When you edit in Protege you are thinking in terms of Description Logic but what Protege generates for you is RDF/RDFS triples and when you save a file it stores that information in one of several different possible serialization formats (RDF/XML, Turtle, JSON-LD, etc.) Cheers, Michael https://www.michaeldebellis.com/blog On Sun, Jan 19, 2025 at 11:20 AM Steve Vestal via protege-user <[email protected]<mailto:[email protected]>> wrote: For example, the input file contained the statement oslc:Error a rdfs:Class ; but the saved file had the statement oslc:Error rdf:type owl:Class ; On 1/19/2025 11:59 AM, Samson Tu wrote: Can you explain what you meant by the modifications Protégé (OWLAPI) makes to the initial input? Samson On Jan 19, 2025, at 5:46 AM, Steve Vestal via protege-user <[email protected]><mailto:[email protected]> wrote: Someone recently pointed me to the "OWL 2 Web Ontology Language RDF-Based Semantics (Second Edition)" standard. I was aware that Protege (OWLAPI) does some modifications to the initial input in some cases. Are those modifications based on the RDF to DL transformations described in that standard? Is this related to OWL Full? _______________________________________________ protege-user mailing list [email protected]<mailto:[email protected]> https://mailman.stanford.edu/mailman/listinfo/protege-user _______________________________________________ protege-user mailing list [email protected]<mailto:[email protected]> https://mailman.stanford.edu/mailman/listinfo/protege-user _______________________________________________ protege-user mailing list [email protected]<mailto:[email protected]> https://mailman.stanford.edu/mailman/listinfo/protege-user _______________________________________________ protege-user mailing list [email protected]<mailto:[email protected]> https://mailman.stanford.edu/mailman/listinfo/protege-user _______________________________________________ protege-user mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/protege-user
PastedGraphic-1.tiff
(image/tiff, 414.8 KB) - not displayed