- Manchester OWL syntax support (moved python-dlp/InfixOWL to
FuXi.Syntax)
- Ontology normalization checking
- Fixes to DLP algorithm
The full changelog:
- moved InfixOwl to FuXi.Syntax module.
- Added Manchester OWL serialization and ontology normalization
capabilities to Fuxi command line.
- Bumped rdflib version to 2.4+
- fixed Rete/AlphaNode.py term concatenation to use str(term) instead
of just term.
- moved DescriptionHornLogic to FuXi.DLP
- added TBOX classification axioms to non-DHL ruleset (for non ABOX
classification)
- some simple refactoring
- commented out all print statements (these will later be uncommented
but redirected to std.error)
- added capabilities for recursively expanding disjunctive operators
via LloydTopor transformation
- added capabilities for recursively expanding entailed clauses via
LloydTopor transformation
- added tail recursive function for fully traversing Horn clauses in
breadth-first fashion
- added fixes to code which was not properly expanding all generators
exhaustively
- added support for owl:someValuesFrom
- added fix for owl:intersectionOf transformation
- added warning for use of DescriptionLogic constructs which result in
multiple disjunctive in the body of the resulting Horn rules
Example usage of the DLP module is below (an excerpt from the
CommandLine module):
from FuXi.Rete.RuleStore import N3RuleStore
from FuXi.DLP import MapDLPtoNetwork, non_DHL_OWL_Semantics
from FuXi.Rete.Util import generateTokenSet
from rdflib.Graph import Graph
from cStringIO import StringIO
#Instanciate the rule store/graph
ruleStore=N3RuleStore()
ruleGraph = Graph(ruleStore)
#create the 'closure delta' graph (where the inferred triples will be
placed)
closureDeltaGraph = Graph()
#parse the initial RDF graph as RDF/XML
factGraph.parse(..RDF fact URI..)
#parse the ruleset containing covering Description Logic semantics
outside of DHL
#(but expressible in N3)
ruleGraph.parse(StringIO(non_DHL_OWL_Semantics),format='n3')
#instanciate the network
network = ReteNetwork(ruleStore,
inferredTarget = closureDeltaGraph)
#'Project' the OWL assertions in the fact graph(s) into Horn clauses
updating the
#network in the process
MapDLPtoNetwork(network,factGraph)
#feed the initial facts to the network (firing conclusions)
network.feedFactsToAdd(generateTokenSet(factGraph))
The DLP horn rule compiler has been tested against GALEN and DOLCE.
The major changes are now available to the command-line script
'Fuxi'. There are now two additional command-line options:
--man-owl If present, either the closure (or just the
inferred triples) are serialized
using an extension of the manchester OWL
syntax
with indications for ontology normalization
(http://www.cs.man.ac.uk/~rector/papers/
rector-modularisation-kcap-2003-distrib.pdf)
--normalize Will attempt to determine if the ontology
is 'normalized' [Rector, A. 2003]
The first makes use of the recently added InfixOwl module to provide
an additional (more readable) RDF/OWL serialization syntax: The
Manchester OWL syntax. Also included is an option which attempts to
determine if the specified OWL graph is 'normalized'. It follows the
heuristic guidelines outlined in Alan Rector's 2003 paper
"Modularisation of Domain Ontologies Implemented in Description Logics
and related formalisms including OWL" [1]. The OWL syntax serialized
by InfixOWL includes indication for "Primitive" and "Defined" classes
as defined in that paper.
A module demonstrating the use of InfixOWL to construct an ontology
for Computer-based Records (CPR) has been uploaded to the python-dlp
Google Code site:
http://python-dlp.googlecode.com/files/pomr.py
[1]http://www.cs.man.ac.uk/%7Erector/papers/rector-modularisation-
kcap-2003-distrib.pdf