OWL verbalizer demo

Introduction

This demo shows how an ontology that is written in OWL 2 XML is verbalized in Attempto Controlled English (ACE). This conversion is designed to be reversible, i.e. one can convert the ACE representation back into OWL so that no loss in meaning occurs.

The source code, issue list, documentation etc. of the OWL verbalizer are available at code.google.com/p/owlverbalizer/.

Demo

Enter the content of an OWL ontology in the OWL 2 XML format.
(You can use OWL Syntax Converter to convert from RDF/XML, Turtle, etc. into OWL 2 XML.)

Specify the output format

plain ACE text (text/plain)
HTML table of Axiom-Sentences mappings (text/html)
tokenized and without lexicon lookup in 2-column CSV (text/plain)

... and press

If the ontology contains a syntax error or takes too long to verbalize then an error message is returned.

How is the verbalization done?

We first rewrite the class expressions and axioms via a limited number of more basic class expressions and axioms. The motivation behind this step is to replace axioms like

ObjectPropertyDomain(R C)

which have very little syntactic structure and contain logic-specific words like `domain'.

The remaining class expressions are mapped to ACE noun phrases and the remaining axioms to ACE sentences. OWL properties are ACE verbs or of-constructs and OWL individuals are ACE proper names. The following table shows an example how the OWL constructs are mapped to ACE constructs.

OWL ACE
Named property Transitive verb, e.g. own; or of-construct, e.g. father of
ObjectInverseOf(R) Passive verb, e.g. is owned by; or Saxon genitive, e.g. X's father
Named class Common noun, e.g. person
owl:Thing something, thing, X, Y, ...
ObjectComplementOf(C) something that is not a person; something that does not own a car
ObjectIntersectionOf(C1 ... Cn) something that is a person and that owns a car
ObjectUnionOf(C1 ... Cn) something that is a wild-animal or that is a zoo-animal
ObjectOneOf(a) Proper name, e.g. John
ObjectSomeValuesFrom(R C) something that owns a car
ObjectHasSelf(R) something that likes itself
ObjectMinCardinality(n R C) something that borders at least 2 countries
SubClassOf(C D) Every country that borders no bodies-of-water is a landlocked-country.
SubObjectPropertyOf(ObjectPropertyChain(R1 ... Rn) S) If X owns something that is-part-of Y then X owns Y.
DisjointObjectProperties(R S) If X is-child-of Y then it is false that X is-spouse-of Y.

ACE allows relative clause coordination and embedding of relative clauses into other relative clauses. This gives us quite a bit of flexibility in expressing more complex OWL class expressions. For example,

ObjectSomeValuesFrom(eat ObjectComplementOf(ice-cream))

would be verbalized as an ACE noun phrase

something that eats something that is not an ice-cream

Still, verbalizing very complex class expressions would require a support for parentheses which ACE does not offer. We do not see it as a shortcoming, rather it is a natural restriction on the complexity of class expressions (which should be readable for others to understand).

Finally, we apply some simple modifications to make the sentences more readable, e.g. we try to remove negations and reorder the elements in coordination.

OWL entities vs ACE content words

The quality of the verbalization depends somewhat on the morphologic and orthographic nature of the names used for individuals, classes and properties in the input ontology. The verbalizer assumes that all individuals are denoted by singular proper names (preferably capitalized), classes by singular common nouns, and properties by transitive verbs in their infinitive form or as singular nouns. These restrictions are needed because the names will be used in certain syntactic constructions or will undergo certain morphological changes.

The default synthesis of entity IRI surface forms just preserves the IRI fragment (the part after '#' or the last '/') but one can add annotations to the input ontology to specify the desired surface form, e.g.

<AnnotationAssertion> 
	<AnnotationProperty IRI="http://attempto.ifi.uzh.ch/ace_lexicon#CN_pl"/>
	<IRI>#man</IRI>
	<Literal>men</Literal>
</AnnotationAssertion>

The following annotation properties are supported:

Annotation property IRI Meaning Example IRI Example literal
http://attempto.ifi.uzh.ch/ace_lexicon#PN_sg singular form of a proper name #John John
http://attempto.ifi.uzh.ch/ace_lexicon#CN_sg singular form of a common noun #man man
http://attempto.ifi.uzh.ch/ace_lexicon#CN_pl plural form of a common noun #man men
http://attempto.ifi.uzh.ch/ace_lexicon#TV_sg singular form of a transitive verb #man mans
http://attempto.ifi.uzh.ch/ace_lexicon#TV_pl plural form of a transitive verb #man man
http://attempto.ifi.uzh.ch/ace_lexicon#TV_vbg past participle form a transitive verb #man manned

In the csv-mode, the IRI is returned as it is together with the morphological type that applies in the given context, e.g:

pn_sg	http://www.example.org/story.owl#John
f	is
f	a
cn_sg	http://www.example.org/story.owl#man
f	.

In the ace-mode, in case an object property has the CN_sg annotation then the property is verbalized as a relational noun, using an of-construct, Saxon genitive, or the whose relative pronoun. Examples:

John is a father of Mary.
Mary's father is John.
Everything whose father is John ...

This is an experimental feature which does not always work correctly.

Kaarel Kaljurand 2013-09-20