top of page

Protege Best Practices: Export Inferred Axioms

Writer: Michael DeBellis
Michael DeBellis
Oct 4, 2019
4 min read

Updated: Oct 1

One of the most useful options in Protege that I find many new users aren't aware of is the command:


File>Export inferred axioms as ontology


This is useful in many situations. The reasoner can make all sorts of changes to your ontology. It can make individuals instances of different classes, infer new values for individuals, etc. However, these changes are not saved when you save your ontology in the standard way. You need to re-run the reasoner every time you open the ontology.


For many uses this is not an issue but there are often times when you want to save your inferences. For example, there are tools such as WebVOWL that provide enhanced visualization of your ontology. I don't typically use WebVOWL when I design an ontology. However, when I want to display an ontology to a wider group, some of whom may not have a deep understanding of OWL or Protege, WebVOWL presents a very nice graphical way to do this. Usually you don't just want to show the ontology without the inferences, you want to include all the inferred values.


Another example is when uploading files to WebProtege. As of this post date WebProtege does not include reasoners. So if you upload a file into WebProtege for others to view and comment on they will often be missing a great deal of information that would be provided by the reasoner.


Another example is the Individuals Matrix tab. This is a very useful tab for displaying individuals and the values of their object and data properties in a spreadsheet style table. However, this tab only displays values that are declared by the user, not those inferred by the reasoner.


In these cases and others the Export command solves the problem. It saves almost all of the inferences as if they are user axioms so that these various tools will display them.


When using this option you will be presented with a wizard that walks you through generating the export file (see the picture below for the first screen in this wizard). Before launching the wizard I always copy the Ontology IRI from the top of the Active ontology tab. I do this because I usually want the new ontology that includes the inferences to have the same IRI as the ontology that I'm saving. However, that isn't the default. The default is that the wizard will generate a new untitled IRI. If you want that it's fine to use it but I usually want to keep the same IRI so that SPARQL queries and other code will work the same on the ontology with inferences. The screen in the wizard that prompts you for the saved ontology's IRI comes toward the end of the wizard which is why I copy the existing IRI first, so that when I get to that part of the wizard I can paste in the existing IRI rather than use the default of a new untitled IRI.


The wizard will present you with several options, e.g., what type of inferences (subclasses, object properties, etc.) to export. The default is that not all the inferences are checked however I typically check all the boxes. You will receive a warning for the last two check boxes that saving those may take a while but for most ontologies this is not the case. My strategy is to always try to save everything and then on the rare occasion when saving takes a long time, go back and uncheck those last two boxes.


One other thing to be aware of is that the dialog for saving the inferred axioms file looks like a standard file saving dialog that will include the ".owl" extension to the file. Unfortunately, as of the time of this post (Protégé version 5.5.0) this is not the case. The saved file does not have an extension so if you try to open it with Protégé or some other tool it will not be recognized as an OWL file. There is a simple work around. Either include ".owl" at the end of the file name when you enter it into the Wizard (normally this would cause the file to be named "File.owl.owl" but in this case it will just have the normal ".owl" extension) or after you save the exported file navigate to the file in your operating system and edit the name and add the ".owl" extension. You will get a warning that this will change the way the file can be processed but of course this is what you want, you want it to be recognized by the OS and applications as an OWL file.


One final note (this is an update since I wrote this original post): when you use this option the third dialog in the Wizard will prompt you for an IRI for your exported ontology. It will give you a default which is just the default Protege generates for any new ontology. Often you don't want this. If you use SPARQL for example, you will have mappings in the Active Ontology tab for your ontology that you use as prefixes at the beginning of your SPARQL queries. If you accept the default IRI then these mappings have to be changed every time you do an export. What I usually do is to copy the existing IRI for the ontology before I start the Export command. Then when I get to that part of the Wizard I paste the existing IRI into the field for the IRI for the exported ontology.


2 Comments


Guest
Sep 26

Nhiều hướng dẫn trên mạng chỉ nói “vào trang, gõ mã, xem điểm”, nghe đơn giản nhưng người lần đầu vẫn vướng ở chỗ chọn đúng kỳ thi. Mình đã chọn nhầm đợt thi thử rồi ngồi thắc mắc vì sao điểm lạ. Sau đó mình chú ý dòng tiêu đề kỳ, năm học và hội đồng trước khi nhìn số. Có công cụ tra cứu điểm hiện đủ các lớp đó thì đỡ phải đoán. Mình cũng thích khi trang ghi rõ dữ liệu lấy từ đâu. Không cần giao diện cầu kỳ, chỉ cần không để người dùng hiểu sai kỳ.

Like

Guest
Aug 20

Khi tìm hiểu nạp xu tiktok, mình quan tâm đến tốc độ xử lý nhưng vẫn ưu tiên sự rõ ràng. Một giao dịch tốt nên cho biết mệnh giá, số xu dự kiến, phương thức thanh toán và kết quả cuối cùng. Nếu có vấn đề thì người dùng cũng cần biết đang chờ hay phải thực hiện lại bước nào.

Like
  • facebook
  • linkedin

©2019 by Michael DeBellis. Proudly created with Wix.com

bottom of page