Re: [protege-user] Modelling Composite Classes
Michael DeBellis <[email protected]>
| Newsgroups | gmane.comp.misc.ontology.protege.owl |
|---|---|
| Message-ID | <CALGFikdcNzQtVXW0+0Y-2WWgcY3_5TDiFpi90uEEJUPF8fcsFw@mail.gmail.com> |
> > The ontology does not use individuals. Just curious: why? I actually see this more often than I would think but IMO it is never a good idea. For one thing, there are a lot of reasoning errors that you will only find when you create individuals, I actually encountered one last night, I'm building an ontology based on some of the patterns in Martin Fowler's book Analysis Patterns, it is actually quite surprising how well those map to OWL even though they were intended for OOP. Fowler's patterns are mostly about data and constraints and if anything the patterns often are better implemented in OWL rather than the graphic language he uses because constraints he defines only in text can be modeled as axioms on classes in OWL... sorry, tangent. Are the OWL2 Boolean connectives owl:unionOf or owl: intersectionOf only > used for individuals? They are used to model classes and the domain and range of properties so they describe classes but (this is actually an example of what I was saying) you often can't tell if they are all consistent until you get to individuals. So if you define the domain of a property (or a class) as "Person or Organization" that creates an anonymous class (for the domain, for the class the axiom just defines that class) that is the union of Person and Organization. Similarly you could define the class Man as: "MalePerson and Adult" which would mean it is the Intersection of those two classes. You can see some examples in the example ontology I'm attaching. I've been working on some training materials for a client (with the agreement that most of what I build will be open source). I'm attaching an ontology I created to demonstrate some common ontology patterns. It might be generally useful to show things like how to define containment with places and how to define family relations with OWL axioms (and two SWRL rules for aunts and uncles). BTW, because it uses SWRL best to use Pellet, although I think if you use a different reasoner you just won't see the proper assertions for aunts and uncles. I hadn't gotten around to modeling components yet so I did something really quick and dirty. Created a class called ComputerBOM (BOM is of course Bill of Materials, what manufacturing people call these component and sub-component descriptions) where ComputerBOM has_Part Motherboard and has_Part Monitor,... and Motherboard has_Part CPU and has_Part RAM, etc. I also created a property called has_All_Parts which is a super property of has_Part and takes the transitive closure of all the parts. And I used a plugin called Individual Hierarchy to show the simple example. Hope this is useful for what you're doing. See pictures below. One other suggestion: I'm not a fan of most Upper Models. Most of them use philosophic concepts that I think are interesting (and mostly wrong) but mostly irrelevant to good software design. However, there is an exception. I like the Gist upper model from Semantic Arts. It is my idea of what a good upper model should be: simple, not too big, doesn't force a lot of design decisions on you but models some common business and engineering concepts in a standard way. https://www.semanticarts.com/gist-a-minimalist-upper-ontology-v1/ One final idea: it can be useful to work with ChatGPT on things like this. Describe your problem and ask it to generate Turtle code for a simple model. Keep in mind it will very often get the first version wrong in some ways but I've still found it useful for some more complex domains to give me an initial start... but again don't take what it gives you as always correct, it's often not. In fact I would say the norm is I never get what I want the first time. One last thing if you do try ChatGPT: the more you constrain the problem the better chance you have to get something useful. So if you describe say 10 classes each with several sub classes and 20 properties I can almost guarantee you won't get anything useful from ChatGPT. But if you constrain it to small problems like how to model components and sub components it can be quite useful Let me know if you have questions. Cheers, Michael https://www.michaeldebellis.com/blog [image: Computer BOM Class.png] [image: ComputerBOM.png] [image: Computer1.png] On Wed, Apr 9, 2025 at 12:12 AM Ann Clark via protege-user < [email protected]> wrote: > Hello, > > Data scientists on my team create composite classes based on ontology > classes, in downstream systems. I am looking for the best way to model > representations of these externally defined classes using protege to > provide a reference mapping between composite classes and another ontology. > > For context, composite classes are not currently in the ontology. The > ontology does not use individuals. > > Example A: Tree Overhang is a composite of Tree AND Building. > > Example B: Composite Class X includes classes C, D, E, F, G, and H. (A > slightly more special subclass relationship?). > > > Are the OWL2 Boolean connectives owl:unionOf or owl: intersectionOf only > used for individuals? > > > Any and all feedback is appreciated. > > > Get Outlook for Android <https://aka.ms/AAb9ysg> > _______________________________________________ > protege-user mailing list > [email protected] > https://mailman.stanford.edu/mailman/listinfo/protege-user > _______________________________________________ protege-user mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/protege-user
Computer BOM Class.png
(image/png, 42.2 KB) - not displayed
ComputerBOM.png
(image/png, 23.9 KB) - not displayed
Computer1.png
(image/png, 20.4 KB) - not displayed
People Example with BOM.ttl
(application/octet-stream, 69 KB) - not displayed