Data Properties in Tawny
Although it appears fairly innocuous, the last
commit
to tawny-owl seems momentus to me. While I still need to go through the
spec line-by-line, and the code needs some clean up, this commit
essentially represents the completion of the tawny.owl
namespace; the
addition of data properties and data types was the last part of the spec
that I have to fulfil.
When I started off the tawny-owl library in October (n.d.a) I was most interested in getting a test environment, and the ability to use a normal editor. Subsequently, and particularly in the course of writing up my first paper on this library (n.d.b) it became obvious to me that I needed to support all of OWL2. I think I have achieved my original design motivations and some more besides. I have also learned a lot about OWL, the OWL API and Manchester syntax. It is also a strange project, because it is the first time I have fulfilled a specification in quite this way. I cannot recall the last time I could reasonably be said to have finished something, as research is generally open-ended.
I did not, however, start with a regular syntax in mind. In general, the conversion to lisp has worked reasonably well: the object side of OWL in particular falls into a prefix, lisp syntax very naturally; the individual side less so. The data side of OWL had another surprise in store for me: it looks very similar to the object side; so I wanted to share syntax. However, all the Java method calls are named differently and take different types and parameter number.
In the end, I have supported this through a multi-method and some heuristics to guess which call is wanted. For instance, with these two calls from the pizza ontology:
(owlsome hasTopping CheeseTopping)
(owlsome hasCalorifiContentValue (span =< 400))
we generate quite different types of OWL object. The owlsome
method
defers to either object-some
or data-some
respectively, which can
also be used directly. In this case, the difference is obvious; however,
tawny also takes strings in most of these places; in this case, we
convert to an IRI and check whether it exists in the ontology or any
ontology we know about first. I suspect that these heuristics will work
in most cases, but fail in some; only time and experience will tell me
about these.
Before the next release, 0.12, I will finish both the inline, function documentation and update the tutorial. After this I plan to sit on the API a while, think about the functions and the syntax to make sure I am happy; the release after should be 1.0 and as is the way of these things, I will be stuck with the apperance of the API for quite a while. This also allows me to avoid a 0.13 release without accusation of superstition.
There are still many parts of tawny that I wish to improve; in
particular, I need to extend the repl facilities with doc
and
apropos
features — my attempt to hijack the Clojure native facilities
have failed despite extensive efforts. And explanation code needs to go
in; currently, waiting for protege to reason and produce these results
in a soul destroying experience; I want me continuous integration tests
to automatically dump explanations whenever inconsistencies happen.
But new features are for the future; for this iteration, tawny-owl is finished and now will be polished.
———. n.d.a. https://www.russet.org.uk/blog/2214.