Wednesday, June 20, 2007

Using Semantic Tools with real data

In one of my previous posts I mentioned the question “what do you gain from having the instance data present and available for processing by semantic web tools?” The core idea is that this would simplify the detection of modeling errors and highlight domain misunderstandings, but I couldn’t be sure until I had tried it with data from a real system.

I’ve finally been able to review the results from one such system and have convinced myself that there it is useful.

A bit of context-- doing this in a way that I considered valid required data from of a system that I understood well. The best available system was an “art submissions” application that tracks available artwork and its attributes.

The data was extracted using my rdf_rails utility which generate RDF and OWL files from a RoR application

After trying this out for a bit, I have come to the conclusion there is utility here.

The utility can be best demonstrated with a simple example (all examples are in RacerPro, see my previous post)

(retrieve (?x ) (and (?x Artwork) (neg (?x shipable-art)) (neg (?x unshipable-art))))*


This query retrieves all artworks that are neither shippable nor unshippable.

Since the shippable-art & unshippable-art concepts were intended completely cover the Artworks category, any non-null result indicates either an error in domain modeling/understanding or data cleanliness, either of which should be detected prior to rolling out the model and the application that embodies it.

I admit that dichotomous coverings are a simple case but think that it clearly demonstrates the value of the approach.

While on the topic of semantic web tools it would be remiss of me to not mention the swtools spreadsheet at which is a handy and thorough catalog of available semantic web tools

Published by Michael K. Bergman

Notes:
* Note from the RacerPro documentation neg is a unary constructor, the negation as failure (NAF) negation. The argument is
a query body.

The concepts shippable-art and unshippable-art are defined as follows”

(define-concept shipable-art
(or (boolean= Artwork_framed #T)
(and
(some Artwork_weight_pounds (<> racer-internal%has-real-value 10) )
(some Artwork_width_inches (> racer-internal%has-real-value 10) )
(some Artwork_height_inches (> racer-internal%has-real-value 10) )
(some Artwork_depth_inches (> racer-internal%has-real-value 10) )
))

Monday, June 18, 2007

RacerPro

I’ve been doing some ontology analysis using RacerPro. I decided to try out RacerPro primarily because my current modeling project uses numeric relationships to determine class membership. My quick scan of the available tools determined that RacerPro offered the best support in this space (any suggestions about other tools supporting such operations would be appreciated)

RacerPro supports the use of numerics in two ways.

The first is as a simple query e.g.,
(retrieve (?x) (?x (and (<= Artwork_width_inches 10) (<= Artwork_height_inches 10))))
;; aka retrieve every object for which the role (property) Artwork_width_inches < 010 and Artwork_height_inches <= 10

The second is as a class/concept

(define-concept can-ship
(and
(some Artwork_width_inches (<>
(some Artwork_height_inches (<>

Which is essentially the same only this time defining a concept rather than issuing a query.


It is fair to say that the racer-internal%has-real-value term did not leap out from the documentation. However the Racer technical support was both very accurate and extremely responsive, getting me up and running pretty quickly.

All in all, I’m happy with the product.