<!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>ODPReco - A Tool to Recommend Ontology Design Patterns ?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Maleeha Arif Yasvi[</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Raghava Muth</string-name>
          <email>raghava.mutharajug@iiitd.ac.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Knowledgeable Computing and Reasoning Lab, IIIT-Delhi</institution>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Ontologies evolve over time due to changes in the domain and requirements of the application. Maintaining an ontology over time and keeping it up-to-date with respect to the changes in the domain and requirements of application is hard. But a high quality ontology can signi cantly reduce the e ort and cost of ontology maintenance. Ontology Design Patterns (ODPs) can be used to improve the quality of an ontology and make it more modular and reusable. But with around 220 (and increasing) ODPs across six di erent categories, it is not easy to determine the right set of ODPs to choose for a particular use case even for experts. This becomes even more di cult in the case of refactoring existing ontologies using the right set of ODPs. We describe here a proposal for a work-in-progress tool named ODPReco that can recommend the possible ODPs to use in a given ontology. ODPReco analyzes the lexical, structural, and behavioural aspects of an ontology, along with learning from existing ODP implementations to recommend ODPs that can be used for refactoring an ontology.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontology Design Pattern toring Ontologies</kwd>
        <kwd>Modular Ontologies</kwd>
        <kwd>Ontology Maintenance</kwd>
        <kwd>Refac-</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Ontologies capture the state of the world (domain) at the point of their creation.
But over time, there will be changes in the domain and the applications that
depend on the ontology will evolve as well. So an ontology is not a static piece
of artifact that can be built once and used over the lifetime of the application.
It needs to evolve with the changes in the domain and application requirements.
The developers maintaining the ontology may change over time and they might
want to make changes to the class hierarchy, relationships among the classes,
make some classes as properties etc. There is a body of work on ontology
evolution [
        <xref ref-type="bibr" rid="ref14 ref2">14, 2</xref>
        ] and maintenance. One of the crucial factors that is always stressed
upon is that, the quality of the ontology plays a very important role in ontology
? Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
maintenance. A good quality ontology is modular, easy to understand, and more
amenable to changes [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This makes it easier to maintain the ontology, which in
turn reduces the maintenance cost. This holds true for the maintenance of
software artifacts as well. It is said that around 80% of the software development
cost goes into maintenance and a good quality software can signi cantly reduce
the cost [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Ontology Design Patterns (ODPs) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] are solutions to common modelling
problems. They are generally small in size and can be used as building blocks in
developing modular ontologies. Large monolithic ontologies can be refactored to
use ODPs and thus improve their quality. But it is not easy for ontology
developers, especially the inexperienced ones to identify the right ODPs to use for a
particular ontology (or use case that the ontology is modelled for). This is due to
the number and variety of ODPs that are available. ODP repository1 lists nearly
220 (and counting) ODPs spread across six di erent categories. We propose a
work-in-progress tool named ODPReco that analyzes the lexical, structural, and
behavioural aspects of an ontology to recommend a set of ODPs that can be
used to refactor a non-modular ontology. ODPReco also learns from existing
ODP implementations. If a non-modular ontology (or part of it) is similar to an
existing ontology that has implemented ODPs, then the non-modular ontology
can also make use of the same ODPs.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Approach</title>
      <p>
        In order to recommend ODPs, ODPReco would need a list of all the available
ODPs including their details such as the description, competency questions, and
use cases. Along with that, a collection of ontologies in which the ODPs used
are clearly indicated is also required. This helps the tool to learn from existing
ODP implementations. The following two datasets satisfy these requirements.
We will refer to these datasets as our collection.
a) ODPs from the ODP repository. We will have a local copy of all the ODPs
from the repository and create an index based on the details of each ODP
such as the name, description, competency questions, use cases, similar
patterns, class names, and property names.
b) MODL: Modular Ontology Design Library [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. It is a downloadable
curated collection of well-documented ODPs. It contains annotations indicating
which patterns were used and also the axioms that are part of the pattern.
      </p>
      <p>We will discuss two complementary techniques to ODP recommendation in
the following sections.
2.1</p>
      <sec id="sec-2-1">
        <title>Ontology Analysis</title>
        <p>We will be analyzing a given ontology on the following dimensions.
1 http://ontologydesignpatterns.org/
a) Lexical Analysis. The names of classes, properties, and instances from the
ontology are compared with the ones from our collection. Apart from names,
we will be including other descriptive text such as labels and comments.
Word embeddings can be used to get a ranked list of similar words (and
hence ODPs that can contain these words) present in our collection.
b) Structural Analysis. We will be comparing the axioms of the given
ontology with the ones from our collection. We can generate embeddings for
the axioms by converting them into a xed format. An example for axioms
involving cardinalities is given below. Each axiom type will have a format
along the same lines.
hAxiomTypeIDi hClassesInAxiomi hPropertiesInAxiomi hCardinalityi
Using the embeddings generated from the given ontology as well as the ones
from our collection, we will generate similarity scores and rank the axioms
(and the corresponding ODPs that are associated with these axioms).
c) Behavioural Analysis. The behavioural aspect of the ontology can be
analyzed by making use of the competency questions associated with the given
ontology. They represent the ontology requirements and help in capturing
the scope an ontology. These competency questions are compared with the
ones associated with the ODPs and a similarity score is generated. We are
aware of the fact that most ontologies do not have competency questions
associated with them. But if available, we will analyze the behaviour of the
ontology using the competency questions.</p>
        <p>The scores obtained from these three dimensions of an ontology are integrated
and normalized. Weights can also be assigned to each of these three dimensions.
Depending on the scores, the top k ODPs can be recommended to the user for
the given ontology.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Supervised Machine Learning on Existing ODPs</title>
        <p>
          Chess [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] and cooking recipes [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] ontologies along with the MODL collection
can be considered as labeled data. The ODPs used in these ontologies are clearly
known and they are well documented. This can be used as training data. During
the training phase, we should capture features that can help in determining why
a particular ODP has been used in an ontology. The three types of analysis
discussed in the previous section - lexical, structural, and behavioural aspects of
the ontology can be used as features. There could be other aspects of an ontology
that can be used as features, but we have not yet looked into all the possibilities.
After learning the machine learning model, we can now use the given ontology
to predict the classes (ODPs) it should belong to. So this becomes a
multilabel classi cation problem. But there are some obvious disadvantages to using
machine learning in this context.
        </p>
        <p>{ Training data is limited.
{ The coverage of the training data is limited, i.e., not all possible 220 ODPs
are covered in the training data. So there will be a bias towards the ODPs
that are most frequently used in the training data.
{ There are large number of classes (220). So prediction will not be accurate.</p>
        <p>Due to these reasons, it is important to complement the machine learning
model with an alternative, which is to predict (recommend) ODPs by analyzing
the ontology.</p>
        <p>We are currently implementing the ideas discussed here. ODPReco will be
available publicly and it could also be made into a protege plug-in.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>In the software engineering community, there has been work on recommending
software design patterns by analysing the code. We plan to adapt that work to
the case of recommending ODPs for a given ontology. We brie y discuss some
of the techniques used for recommending software design patterns. Along with
this, we will also discuss work related to ODPs.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], code smells (characteristics of the code) are analyzed to recommend
software design patterns. Design pattern recommendation systems are
developed using various techniques. One such technique is the text based approach
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In this approach, the description and the scenario of the design patterns
provided are preprocessed. Pre-processing includes tokenization, stop word
removal and stemming. Vector space model is used to represent the collection of
design patterns in the form of unigrams and bigrams and the most suitable
design pattern for a given problem scenario is selected which is based on the cosine
similarity and TF-IDF. Another approach for recommending patterns is based
on question-answering [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. It is an interactive approach in which questions are
asked from the user and the user answers them with a yes/no/do not know.
Based on these answers, weights are assigned and software design is predicted.
In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], case based reasoning is used. Structural, behavioural and semantic aspects
are considered in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to recommend patterns. The structural aspects are
generalization, attribute, aggregation, and specialization methods. The behaviour of
the design pattern can be analyzed through the control ow graphs [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The
semantic aspect can be analyzed using the programming guidelines and naming
conventions. Software design patterns are also recommended using the classi
cation techniques [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Ontology Design Patterns [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] are small, self-contained ontologies that
provide a solution to a commonly occurring modelling problem across di erent
domains. ODP repository has around 220 ODPs that are divided into six
categories, structural, reasoning, correspondence, presentation, lexico-syntactic and
content ODPs. MODL [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] is a well documented ODP library that contains
ontologies which are clearly annotated with the ODPs.
      </p>
      <p>Even for experienced ontology developers, it is hard to know which among
the 220 patterns is a good t for a given use case. This task becomes hard for
inexperienced ontology developers. Our tool, ODPReco, attempts to ll this gap
by learning from existing ODP implementations and analyzing the structure of
ontologies to recommend ODPs.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>AL-Badareen</surname>
            ,
            <given-names>A.B.</given-names>
          </string-name>
          , et. al.:
          <source>The Impact of Software Quality on Maintenance Process</source>
          .
          <source>International Journal of Computers</source>
          <volume>5</volume>
          ,
          <issue>183</issue>
          {
          <fpage>190</fpage>
          (
          <year>2011</year>
          ), http://www.naun.org/main/NAUN/computers/19-
          <fpage>862</fpage>
          .pdf
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Djedidi</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aufaure</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          :
          <article-title>Ontology Evolution: State of the Art and Future Directions. Ontology Theory, Management and Design: Advanced Tools</article-title>
          and Models pp.
          <volume>179</volume>
          {
          <issue>207</issue>
          (
          <year>2010</year>
          ). https://doi.org/10.4018/978-1-
          <fpage>61520</fpage>
          -859-3.
          <fpage>ch008</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Dong</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peng</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>A Review of Design Pattern Mining Techniques</article-title>
          .
          <source>International Journal of Software Engineering and Knowledge Engineering</source>
          <volume>19</volume>
          , 823{
          <fpage>855</fpage>
          (
          <year>2009</year>
          ). https://doi.org/10.1142/S021819400900443X
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dwivedi</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tirkey</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rath</surname>
            ,
            <given-names>S.K.</given-names>
          </string-name>
          :
          <article-title>Software design pattern mining using classi cation-based techniques</article-title>
          .
          <source>Frontiers of Computer Science</source>
          <volume>12</volume>
          (
          <issue>5</issue>
          ),
          <volume>908</volume>
          {922 (Oct
          <year>2018</year>
          ). https://doi.org/10.1007/s11704-017-6424-y
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hamdy</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elsayed</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Automatic Recommendation of Software Design Patterns: Text Retrieval Approach</article-title>
          . JSW
          <volume>13</volume>
          ,
          <issue>260</issue>
          {
          <fpage>268</fpage>
          (
          <year>2018</year>
          ). https://doi.org/10.17706/jsw.13.4.
          <fpage>260</fpage>
          -
          <lpage>268</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , et. al.:
          <article-title>Ontology Engineering with Ontology Design Patterns: Foundations and Applications</article-title>
          . IOS Press, Amsterdam, The Netherlands (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shimizu</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Modular Ontologies as a Bridge Between Human Conceptualization and Data</article-title>
          .
          <source>In: Graph-Based Representation and Reasoning - 23rd International Conference on Conceptual Structures, ICCS</source>
          <year>2018</year>
          ,
          <article-title>Edinburgh</article-title>
          ,
          <source>UK. Lecture Notes in Computer Science</source>
          , vol.
          <volume>10872</volume>
          , pp.
          <volume>3</volume>
          {
          <issue>6</issue>
          . Springer (
          <year>2018</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -91379-7 1
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Krisnadhi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Modeling with ontology design patterns:chess games as a worked example</article-title>
          . In:
          <article-title>Ontology Engineering with Ontology Design Patterns (</article-title>
          <year>2016</year>
          ). https://doi.org/10.3233/978-1-
          <fpage>61499</fpage>
          -676-7-3
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Nahar</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sakib</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Automatic Recommendation of Software Design Patterns Using Anti-patterns in the Design Phase: A Case Study on Abstract Factory p</article-title>
          .
          <volume>8</volume>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Palma</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farzin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guhneuc</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moha</surname>
          </string-name>
          , N.:
          <article-title>Recommendation system for design patterns in software development: An DPR overview</article-title>
          .
          <source>In: 2012 Third International Workshop on Recommendation Systems for Software Engineering (RSSE)</source>
          . pp.
          <volume>1</volume>
          {
          <issue>5</issue>
          (Jun
          <year>2012</year>
          ). https://doi.org/10.1109/RSSE.
          <year>2012</year>
          .6233399
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Sam</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krisnadhi</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gallagher</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>An Ontology Design Pattern for Cooking Recipes: Classroom Created</article-title>
          .
          <source>In: Proceedings of the 5th International Conference on Ontology and Semantic Web Patterns-Volume</source>
          <volume>1302</volume>
          . pp.
          <volume>49</volume>
          {
          <fpage>60</fpage>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2014</year>
          ), http://dl.acm.org/citation.cfm?id=
          <volume>2878937</volume>
          .
          <fpage>2878943</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Shimizu</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hirt</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <string-name>
            <surname>MODL: A Modular Ontology Design Library</surname>
          </string-name>
          (
          <year>2019</year>
          ), https://arxiv.org/pdf/
          <year>1904</year>
          .05405.pdf
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Plante</surname>
            ,
            <given-names>D.R.</given-names>
          </string-name>
          :
          <article-title>Dynamically recommending design patterns</article-title>
          .
          <source>In: SEKE</source>
          (
          <year>2012</year>
          ), https://pdfs.semanticscholar.org/9ea6/731b7a517.pdf
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Zablith</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Antoniou</surname>
          </string-name>
          , G.,
          <string-name>
            <surname>d'Aquin</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Flouris</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kondylakis</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motta</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Plexousakis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sabou</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ontology evolution: a processcentric survey</article-title>
          .
          <source>The Knowledge Engineering Review</source>
          <volume>30</volume>
          (
          <issue>1</issue>
          ),
          <volume>45</volume>
          {75 (Jan
          <year>2015</year>
          ). https://doi.org/10.1017/S0269888913000349
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>