-
Notifications
You must be signed in to change notification settings - Fork 2
Building the ontology
- Basic build instructions
- Using partial command names
- Building only the import modules
- Ontology build options
In most cases, to build your ontology, you only need to run one simple command. First, make sure the root directory of your ontology project is your working directory. If it is not, you'll need to do something like:
$ cd /path/to/my/ontology/project
Then run:
$ ontopilot make ontology
When you run the make ontology
command, OntoPilot will first check the status of your ontology's import modules and build (or rebuild) the modules, if needed. Then, it will parse your ontology source files and compile the OWL ontology document. If you are using the default project folder structure, the compiled ontology will be placed in the ontology
folder. That's it!
OntoPilot accepts partial command names as long as you provide enough characters so that the command can be uniquely distinguished from other commands. So, instead of typing the full make ontology
command, you can just run:
$ ontopilot make ont
or even:
$ ontopilot m o
You can build the import modules by themselves, without also compiling the ontology. To do this, run:
$ ontopilot make imports
This can be a useful option if you are fine-tuning, troubleshooting, or otherwise experimenting with one or more of your imports.
By default, the make ontology
command will produce an OWL file that is a direct translation of your source files and that has one import
statement for each of your import modules or imported ontologies. You can change this behavior with the following options.
-
-m
or--merge_imports
: Instead of usingimport
statements, merge the entities and axioms from the import modules directly into the compiled ontology. -
-r
or--reason
: Run a reasoner on the ontology and add inferred axioms to the final ontology document. Which reasoner to run, and which kinds of inferred axioms to add to the ontology, are specified in the project configuration file. By default, OntoPilot will use the HermiT reasoner.
These options should be specified on the command line either before or after the make ontology
command. For example, to produce an ontology with both merged imports and inferred axioms, you would run:
$ ontopilot make ontology --merge_imports --reason
Or, for the same results with less typing:
$ ontopilot make ont -m -r
Note that either of the --merge_imports
or --reason
options will also modify the name of the compiled OWL document, so you don't need to worry about accidentally overwriting a version of the ontology compiled with a different set of options.