<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Authoring OWL 2 ontologies with the TEX-OWL syntax</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matteo Matassoni</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Rospocher</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mauro Dragoni</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paolo Bouquet</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Fondazione Bruno Kessler-IRST</institution>
          ,
          <addr-line>Via Sommarive 18, Trento, I-38123</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>The University of Trento</institution>
          ,
          <addr-line>Via Sommarive 9, Trento, I-38123</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper describes a new syntax that can be used to write OWL 2 ontologies. The syntax, which is known as TEX-OWL, was developed to address the need for an easy-to-read and easy-to-write plain text syntax. TEX-OWL is inspired by LATEX syntax, and covers all construct of OWL 2. We designed TEXOWL to be less verbose than the other OWL syntaxes, and easy-to-use especially for quickly developing small-size ontologies with just a text editor. The important features of the syntax are discussed in this paper, and a reference implementation of a Java-based parser and writer is described.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>still XML. Another syntax that follows OWL 2’s structural specification is the
FunctionalStyle Syntax. It is a human-readable and plain text syntax that removes the burden of
XML, however like the previous two, the Functional-Style Syntax is also verbose. In
fact, it has an excessive number of keywords, and typically requires the use of a large
number of brackets, as its name might suggest. The Manchester Syntax is a user-friendly
syntax that can be used to write OWL 2 ontologies. It is the least verbose OWL 2 syntax
and when it is used to write ontology documents, it gathers together information about
names in a frame-like manner as opposed to the others OWL 2 syntaxes. This nature
at a first look may seem a great advantage for the Manchester Syntax, but on the other
hand it makes this syntax unable of handling General (GCI) Concept Inclusions (i.e.,
the Manchester Syntax does not cover the expressivity of the whole OWL 2 language).</p>
      <p>The OWL Latex-Style Syntax was created to deal with the above issues and provide
users with a lightweight syntax that makes it easier to write ontologies. It has been
designed primarily for writing ontology documents in simple textual editor. The syntax
is discussed in detail through the rest of this paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>OWL Latex-Style Syntax</title>
      <p>
        The full specification of the TEX-OWL syntax is available at [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], together with several
examples of using the various syntax constructs. The primary design consideration in
developing TEX-OWL was to produce a syntax that was concise, and quick and easy
to read and write by hand. We took inspiration for developing the syntax from the
LATEX format, given it’s popularity especially in academic environments. A previous
attempt to develop a latex-like syntax was proposed in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], but its syntax and tools are
restricted to a limited subset of OWL 1. Lessons learnt from this previous experience
were also taken into consideration. For example, keywords that represent datatypes and
annotations (i.e., datatypes and annotations were hard-coded in the syntax) were remove
in the new syntax to generalise them via IRIs.
      </p>
      <p>It was also decided that although the syntax should be aligned as much as
possible with the OWL specification, for example by using keywords derived from the
Functional-Style Syntax specification, the main objective would be to strive for
conciseness and a reduction in the amount of time it took users to write axioms. To this
end, some new keywords were created and others changed in name or name length.
Moreover, it was also decided that the syntax should match as much as possible the
LATEX format peculiarities of using keyword and command that start with a backslash
(‘n’) symbol, with required parameters inside curly braces and optional parameters
inside square brackets.</p>
      <p>
        Although the TEX-OWL Syntax borrows ideas from the OWL Functional-Style
Syntax, it is much less verbose. The ontology in Listing 1.1, the TEX-OWL version of the
example in [2, p. 129], illustrates some of the main constructs of the syntax, while we
refer the reader interested in the syntax of all OWL 2 constructs to the complete
specification in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. An OWL ontology written in TEX-OWL starts with an optional preface and
continues with the actual ontology document. The optional preface is where prefixes
can be declared via the new keyword nns. This keyword can be used also to declare
a default prefix, which will be used for interpreting simple IRIs.2 The actual
ontology document begins with nbeginfontologyg and ends with nendfontologyg
syntax. After the begin ontology statement, users can also provide an optional
ontology IRI and a even more optional version IRI typing them inside square brackets:
[ontologyIRI, versionIRI]. Inside the begin/end block, user can import other
ontology documents, using the keyword nimport, declare axioms and put ontology
annotations. To favour the readability of the ontology example in Listing 1.1, each
TEXOWL statement is preceded by its natural language phrasing, injected in the ontology
code as TEX-OWL comments (’%’), and an indication of the type of construct used.
      </p>
      <p>Listing 1.1. An African Wildlife Ontology in TEX-OWL
n ns &lt;http://www.mydomain.org/african#&gt;
n b e g i n f o n t o l o g y g [ &lt;http://www.mydomain.org/african&gt; ]
% A n i m a l s form a c l a s s [ C l a s s d e c l a r a t i o n ]
a n i m a l n c
% P l a n t s form a c l a s s d i s j o i n t from a n i m a l s [ D i s j o i n t c l a s s e s ]
a n i m a l n c d i s j o i n t p l a n t
% T r e e s a r e a t y p e o f p l a n t [ S u b c l a s s Axiom ]
t r e e n c i s a p l a n t
% B r a n c h e s a r e p a r t s o f t r e e s [ S u b c l a s s Axiom , O b j e c t P r o p e r t y</p>
      <p>U n i v e r s a l Q u a n t i f i c a t i o n ]
b r a n c h n c i s a n o f o r a l l f i s p a r t o f gf t r e e g
% L e a v e s a r e p a r t s o f b r a n c h e s [ S u b c l a s s Axiom , O b j e c t</p>
      <p>P r o p e r t y U n i v e r s a l Q u a n t i f i c a t i o n ]
l e a f n c i s a n o f o r a l l f i s p a r t o f gf b r a n c h g
% H e r b i v o r e s a r e e x a c t l y t h o s e a n i m a l s t h a t e a t o n l y p l a n t s or
p a r t s o f p l a n t s [ C l a s s E q u i v a l e n c e , C l a s s E x p r e s s i o n ,
O b j e c t P r o p e r t y U n i v e r s a l Q u a n t i f i c a t i o n ]
h e r b i v o r e n ceq ( a n i m a l n cand n o f o r a l l f e a t s g f ( p l a n t n cor
n o f o r a l l f i s p a r t o f gf p l a n t g ) g )
% C a r n i v o r e s a r e e x a c t l y t h o s e a n i m a l s t h a t e a t a n i m a l s [ C l a s s
E q u i v a l e n c e , C l a s s E x p r e s s i o n , O b j e c t P r o p e r t y</p>
      <p>E x i s t e n t i a l Q u a n t i f i c a t i o n ]
c a r n i v o r e n ceq ( a n i m a l n cand n o e x i s t s f e a t s gf a n i m a l g )
% G i r a f f e s a r e h e r b i v o r e s , and t h e y e a t o n l y l e a v e s [ S u b c l a s s
Axiom , C l a s s E x p r e s s i o n , O b j e c t P r o p e r t y U n i v e r s a l</p>
      <p>Q u a n t i f i c a t i o n ]
g i r a f f e n c i s a ( h e r b i v o r e n cand n o f o r a l l f e a t s gf l e a f g )
% L i o n s a r e a n i m a l s t h a t e a t o n l y h e r b i v o r e s [ S u b c l a s s Axiom ,
C l a s s E x p r e s s i o n , O b j e c t P r o p e r t y U n i v e r s a l Q u a n t i f i c a t i o n
]
l i o n n c i s a ( a n i m a l n cand n o f o r a l l f e a t s gf h e r b i v o r e g )
% T a s t y p l a n t s a r e p l a n t s t h a t a r e e a t e n b o t h by h e r b i v o r e s
and c a r n i v o r e s [ S u b c l a s s Axiom , S e q u e n c e I n t e r s e c t i o n o f
C l a s s E x p r e s s i o n s , O b j e c t P r o p e r t y U n i v e r s a l</p>
      <p>Q u a n t i f i c a t i o n ]
2 Simple IRIs are equivalent to abbreviated IRIs where the default prefix is used and there is no
need need of typing the colon (‘:’) symbol.
t a s t y p l a n t n c i s a n c a n d o f f p l a n t , n o e x i s t s f e a t e n b y gf h e r b i v o r e
g , n o e x i s t s f e a t e n b y gf c a r n i v o r e gg
% e a t s and e a t e n b y a r e i n v e r s e o f e a c h o t h e r [ I n v e r s e O b j e c t</p>
      <p>P r o p e r t y ]
e a t e n b y n o i n v e a t s
% E v e r y t h i n g t h a t e a t s i s an a n i m a l [ O b j e c t P r o p e r t y Domain ]
e a t s n odomain a n i m a l
n end f o n t o l o g y g
3</p>
      <p>
        A TEX-OWL parser and writer
A Java based reference implementation of a TEX-OWL parser and writer were created.3
They use the OWLAPI framework [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and were developed as modules that can be
integrated inside it. The parser was constructed using the Java (JavaCC) Compiler Compiler
[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. It can parse complete ontologies written in TEX-OWL. The writer, which inside
the OWLAPI is known as renderer, can serialize OWLAPI’s ontology objects to files
written in TEX-OWL. Moreover, the implementation also includes converters, which
can transform a TEX-OWL ontology to any other OWL 2 syntaxes and vice versa.
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Syntax Evaluation</title>
      <p>In this Section, we present the evaluation performed with the help of ontology experts
in order to analyze if the presented syntax is suitable, easy-to-use, and comprehensive
enough for ontology authoring.</p>
      <p>In order to evaluate TEX-OWL, two questionnaires were designed and sent to
knowledge engineers with experience in authoring ontologies with the various OWL syntaxes.</p>
      <p>In the first questionnaire,4 all OWL 2 syntaxes and TEX-OWL’s intuitiveness,
conciseness, and understandability were compared using ten different examples of use.
In details, each example of use consists in a set of axioms expressed by using the 6
syntaxes that we compared, namely, TEX-OWL, Manchester, Turtle, Functional,
RDF/XML, and OWL/XML.</p>
      <p>Table 1 presents the results extracted from the survey submitted to the ontology
experts. Ten knowledge engineers participated to this questionnaire. Each value of the
table represents, for each syntax, how many experts, averaged over the whole set of
example, judged the syntax intuitive and concise with respect to the proposed examples.</p>
      <p>We may observe that, in general, there is a clear distinction between the first three
syntaxes (TEX-OWL, Manchester, and Functional) with respect to the other three
(Turtle, OWL/XML, and RDF/XML). Such a distinction is clearly visible from the judges
about their intuitiveness and their conciseness.</p>
      <p>By comparing, directly, the TEX-OWL syntax with the Manchester and the
Functional ones, we may notice that the intuitiveness of the TEX-OWL syntax is comparable
with the Manchester one, but the TEX-OWL syntax obtained a significant better score
3 The implementation is available from http://github.com/matax87/TexOwl/.
4 Accessible here: http://goo.gl/Cjpqtg
for conciseness with respect to the Manchester syntax. Moreover, we recall that the
Manchester syntax does not cover the whole OWL 2 language: it does not properly
support the expression of General Concept Inclusions (GCIs) (such as “having a parent
who is a person, implies being a person”), which instead are expressible in TEX-OWL
(resp., “\oexists{hasParent}{Person} \cisa Person”).</p>
      <p>The only syntax that has been partially judged concise is the Functional one;
however, the difference between the scores obtained with respect to the TEX-OWL syntax is
different enough to state that, from the conciseness point of view, the TEX-OWL syntax
is the most suitable solution for the ontology authoring task.</p>
      <p>The second questionnaire5 was focused on evaluating the usability of the new
syntax for authoring a small ontology. The task to be completed consists in developing,
by starting from a textual description, the ontology shown in Listing 1.1. Experts were
asked to judge how much the developing of a sample ontology was easy and intuitive,
and to rate the simpleness of developing the sample ontology with the LaTeX-like
syntax with respect to syntaxes previously used by the experts. Ratings were expressed
according to the typical five-level Likert scale. More in details, experts were asked to
answer to three questions about the TEX-OWL syntax: if it was difficult to develop the
ontology (on a scale from 1 to 5, where 5 mean “Very easy”); if the TEX-OWL syntax
was easy to remember (on a scale from 1 to 5, where 5 means “Hard to remember”);
and, by comparing with their previous authoring experiences with other syntaxes, if
the use of the TEX-OWL syntax was better (on a scale from 1 to 5, where 5 means
“Definitely better”).</p>
      <p>Six knowledge engineers took part to this evaluation. On average, the TEX-OWL
syntax obtained a score of 3:5 on the first question, 3:17 on the second questions, and
3:67 on the third one. Therefore, we may state that the experts rated the task of
developing an ontology in TEX-OWL more easy than difficult, that the syntax is slightly more
easy than difficult to remember, and that the use of TEX-OWL syntax was quite better
than previous authoring experiences with other syntaxes.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Concluding Remarks</title>
      <p>TEX-OWL is a new OWL 2 syntax that was designed in response to a demand from
users for a more concise syntax that can be easily used to quickly write small-size
on5 Accessible here: http://goo.gl/lbFu4R
tologies by hand. A characterizing feature of the syntax is that it is inspired by the LATEX
syntax: in particular the syntax uses the same format for parameters and keywords as
used in LATEX. The syntax is suited for use in simple textual editor tools. A reference
implementation of a Java based parser and writer has been produced, which may be
integrated into any tool. The implementation also includes converters, which can
transform TEX-OWL to other OWL 2 syntaxes and vice versa.</p>
      <p>The evaluation results shown that TEX-OWL is the most concise syntax and has
an intuitiveness comparable with the Manchester Syntax, which is the most intuitive
among OWL 2 syntaxes. Moreover, users have found it easy to use TEX-OWL for
authoring a small example ontology and that, in general, this syntax is better to use for
writing ontologies by hands than other OWL 2 syntaxes.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>TEX-OWL Syntax</surname>
          </string-name>
          Grammar: http://github.com/matax87/TexOwl/blob/ master/docs/grammar.pdf
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Antoniou</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <article-title>and van</article-title>
          <string-name>
            <surname>Harmelen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <string-name>
            <given-names>A Semantic</given-names>
            <surname>Web</surname>
          </string-name>
          <string-name>
            <surname>Primer</surname>
          </string-name>
          , The MIT Press, (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Knublauch</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Musen</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rector</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          :
          <article-title>Editing description logics ontologies with the Prote´ge´ OWL plugin (</article-title>
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A tool for working with web ontologies (</article-title>
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Chiara</given-names>
            <surname>Ghidini</surname>
          </string-name>
          , Marco Rospocher, Luciano Serafini:
          <article-title>Modeling in a Wiki with MoKi: Reference Architecture, Implementation</article-title>
          , and Usages
          <source>International Journal On Advances in Life Sciences, IARIA</source>
          , volume
          <volume>4</volume>
          ,
          <fpage>111</fpage>
          -
          <lpage>124</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Fabien</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schreiber</surname>
          </string-name>
          , G.:
          <article-title>Rdf 1.1 xml syntax specification (</article-title>
          <year>2014</year>
          ) http://www.w3.org/ TR/2014/REC-rdf
          <string-name>
            <surname>-</surname>
          </string-name>
          syntax-grammar-
          <volume>20140225</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Beckett</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>New syntaxes for rdf</article-title>
          .
          <source>Technical report</source>
          , Institute For Learning And Research Technology,
          <string-name>
            <surname>Bristol</surname>
          </string-name>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          :
          <article-title>Owl 2 web ontology language xml serialization (second edition</article-title>
          ) (
          <year>2012</year>
          ) http://www.w3.org/TR/2012/ REC-owl2
          <string-name>
            <surname>-</surname>
          </string-name>
          xml-serialization-
          <volume>20121211</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Owl 2 web ontology language structural specification and functional-style syntax (second edition</article-title>
          ) (
          <year>2012</year>
          ) http://www.w3.org/TR/2012/ REC-owl2
          <string-name>
            <surname>-</surname>
          </string-name>
          syntax-20121211/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Drummond</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goodwin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rector</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stevens</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>The manchester owl Syntax (</article-title>
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Obo flat file format 1.4 syntax and semantics</article-title>
          [draft] (
          <year>2011</year>
          ) ftp: //ftp.geneontology.org/go/www/obo-syntax.html.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <article-title>The owl api</article-title>
          , http://owlapi.sourceforge.net.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>13. Latex2owl, http://dkm.fbk.eu/index.php/Latex2owl.</mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Sreeni</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sriram</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Java compiler compiler [tm] (javacc [tm]) - the java parser generator http://javacc</article-title>
          .java.net.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>