top of page
  • Writer's pictureMichael DeBellis

Some Best Practices for New Protege Users

Updated: Sep 27, 2022

I've been following the Protege mailing list for several years. I've noticed that I find myself and other experienced users often repeating certain information with new users. These are best practices and design patterns that experienced users are familiar with but that new users may not be aware of. I've created a series of posts that describe some of the best practices that in my experience are often useful for solving various problems. In each post I usually include one or more supporting documents or example ontologies to demonstrate the concept. In this post I'm summarizing all of these posts in one place. The order I present them in here doesn't correspond to the order that I wrote them in. I wrote them more or less randomly as various ideas occurred to me, here I'm trying to provide some order. Each post (well with two exceptions) are completely independent of each other but in this post I'm listing them in the order that I think would make the most sense for a new user to read them in.

  • Theoretical Basics. This provides an overview of the set theoretic and logical foundation for OWL and a very brief description of how OWL maps to other paradigms such as E/R modeling and object-oriented analysis and design.

  • New Pizza Tutorial. This is a new version of the Pizza tutorial for Protege. I've made it consistent with the new UI and added new sections for SWRL, SPARQL, and SHACL.

  • SWRL Tutorial. A short tutorial on how to use the Semantic Web Rule Language (SWRL) in Protege. The domain is process modeling. A small project plan ontology is developed and rules are used to update things like start times, slack time, etc.

  • Drools vs. Pellet for SWRL rules. A common thing for new SWRL users to do is to use the Drools buttons on the SWRLTab to run SWRL rules. This post describes why using the Pellet reasoner is usually preferable to using Drools.

  • Exporting Inferred Axioms as Ontology. A description of how and when to use a command in Protege to save all the inferences of the reasoner in a file. Typically, inferences are not saved but for many cases it can be very useful to save them.

  • Representing Qualitative Values as an Enumerated Class. This post describes a very useful design pattern to represent qualitative values (e.g., never, seldom, often) as an enumerated class and how to define properties that impose a transitive order on these values which can be tested in rules and DL statements.

  • Implementing N-ary Relations in OWL. This uses the ontology from the previous post and shows how to implement a ternary relation in OWL. The example illustrates how using this design pattern can make your ontology much easier to maintain by eliminating the need to write extra rules when new data is added to the ontology. The 3 SWRL rules used in the example ontology from the previous post are replaced by one rule which not only works for the data in that ontology but would continue to work as new individuals were added.

  • Removing Ontology Prefixes from SWRL Rules. Last and probably least this is a fix for a minor bug that sometimes comes up when using SWRL rules. The SWRLTab will sometimes include the ontology prefix in the name of every object in a rule. This doesn't harm anything, it has no effect on how the rules work but it can look a bit ugly and confusing. The fix is easy but involved manually editing the OWL file which should be done with care as one wrong comma (or as I experience once, one replacement of a quote with a "smart" quote) can make the entire file unreadable.

As always feel free to comment if anything is confusing, downloads aren't working, etc. Or feel free to contact me via email which can be found on my contact page.

1,760 views1 comment

1 Comment

Sep 05, 2023

I came here to thank you for the wonderful work you have been doing. You helped me a lot in my studies, and I believe your collective contribution will continue to benefit many more people in the future.

bottom of page