<!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>TEX-OWL: a Latex-Style Syntax for authoring OWL 2 ontologies</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>
        Since OWL became a World (W3C) Wide Web Consortium recommendation, there has
been a steady stream of Web (OWL) Ontology Language ontology editing tools that
have made their way to users’ desktops. Most notably, Prote´ge´-OWL [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], Swoop [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
TopBraid Composer,1 and MoKi [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        All of these tools offer a variety of presentation or rendering formats for class,
property and individual descriptions and axioms. These formats range from the W3C
officially required RDF/XML exchange syntax [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], to the optionals: Turtle [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], OWL/
XML [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the Functional-Style Syntax [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the Manchester Syntax [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], with some
nonstandard W3C syntaxes, like a Description-Logic style syntax and the Open (OBO)
Biomedical Ontologies format [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>While the use of ontology editing tools is becoming more and more popular, there
are still situations where users have to quickly write small-size ontology for testing or
prototyping purposes, and directly writing the ontology with a text editor would be more
effective (i.e., the overhead of learning the ontology editing tool’s functionalities and
features is more than the benefit obtained by using it). These situations quite frequently
occur in academic context.</p>
      <p>W3C chose RDF/XML as the primary exchange syntax for OWL 2; indeed, this
syntax must be supported by all OWL 2 tools. However, the fact that XML is extremely
verbose and hard to write by hand excludes this syntax for quickly authoring and editing
ontologies in a concise manner.</p>
      <p>W3C provides alternatives to RDF/XML for OWL 2; these include Turtle, OWL/
XML, the Functional-Style Syntax and the Manchester Syntax. OWL/XML is an XML
1 http://topbraidcomposer.com/.
serialization for OWL 2 that mirrors its structural specification. It is more
humanreadable and easier to parse than RDF/XML; however like RDF/XML, OWL/XML is
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 http://github.com/
matax87/TexOwl/blob/master/docs/grammar.pdf, 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="ref11">11</xref>
        ], but its syntax is restricted to a
limited subset of OWL 1. Lessons learned 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. 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,
ioms and put ontology annotations, as shown in the example below:
user can import other ontology documents, using the keyword nimport, declare
axnns &lt;http://www.mydomain.org/african#&gt;
nbeginf o n t o l o g y g[&lt;http://www.mydomain.org/african&gt; ]
% Animals form a c l a s s
a n i m a l nc
% 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
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 are a t y p e o f p l a n t
t r e e n c i s a p l a n t
% Branches are p a r t s o f t r e e s
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
% Leaves are p a r t s o f b r a n c h e s
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 are 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
h e r b i v o r e nceq ( a n i m a l ncand n o f o r a l l f e a t s gf( p l a n t ncor 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 are 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 a r n i v o r e nceq ( a n i m a l ncand 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 are 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
g i r a f f e n c i s a ( h e r b i v o r e ncand n o f o r a l l f e a t s gf l e a f g)
% L i o n s are 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
l i o n n c i s a ( a n i m a l ncand 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 are p l a n t s t h a t are 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
t a s t y p l a n t n c i s a ncandoff 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 e n b y noinv e a t s
e a t s nodomain a n i m a l
nendf o n t o l o g y g</p>
    </sec>
    <sec id="sec-3">
      <title>3 Implementation</title>
      <p>
        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="ref10">10</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="ref12">12</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.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4 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
ontologies by hand. Key features of the syntax are that it is inspired by the LATEX syntax:
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.
3 The implementation is available from http://github.com/matax87/TexOwl/.
in particular the syntax uses the same format for parameters and keywords. The syntax
is suited for use in simple textual editor tools. A reference implementation of a Java
based parser and a writer have 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>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.
In the first questionnaire (accessible here: http://goo.gl/Cjpqtg), all OWL 2
syntaxes and TEX-OWL’s intuitiveness, conciseness, and understandability were
compared using ten different examples of use. The second questionnaire (accessible here:
http://goo.gl/lbFu4R) was focused on evaluating the usability of the new
syntax for authoring a small ontology. Ten knowledge engineers participated to the first
questionnaire, and five of them took part to the second one. Ratings were expressed
according to the typical five-level Likert scale.</p>
      <p>In summary, the results show that TEX-OWL is indeed the most concise syntax
and is intuitive as 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>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="ref2">
        <mixed-citation>
          2.
          <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="ref3">
        <mixed-citation>
          3.
          <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="ref4">
        <mixed-citation>
          4.
          <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="ref5">
        <mixed-citation>
          5.
          <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="ref6">
        <mixed-citation>
          6.
          <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="ref7">
        <mixed-citation>
          7.
          <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="ref8">
        <mixed-citation>
          8.
          <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="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>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="ref10">
        <mixed-citation>10. The owl api http://owlapi.sourceforge.net.</mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>11. Latex2owl, http://dkm.fbk.eu/index.php/Latex2owl.</mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <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>