<!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>Accessing Document Data Sources using Referring Expression Types</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander Borgida</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Enrico Franconi</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Toman</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Grant Weddell</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Cheriton School of Computer Science, University of Waterloo</institution>
          ,
          <addr-line>Waterloo</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computer Science, Rutgers University</institution>
          ,
          <addr-line>New Brunswick</addr-line>
          ,
          <country country="US">US</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>KRDB Research Centre for Knowledge and Data, Free University of Bozen-Bolzano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We show how JSON documents can be abstracted as concept descriptions in an appropriate description logic. This representation allows the use of additional background knowledge in the form of a TBox and an assignment of referring expression types (RETs) to certain primitive concepts to detect situations in which subdocuments, perhaps multiple subdocuments located in various parts of the original documents, capture information about a particular conceptual entity. Detecting such situations allows for normalizing the JSON document into several separate documents that capture all information about such conceptual entities in separate documents. This transformation preserves all the original information present in the input documents. The RET assignment contributes a set of possible concept descriptions that enable more refined and normalized capture of documents, and to more crafted answers to queries that adhere to user expectations expressed as RETs. We also show how RETs allow checking for a document admissibility condition ensuring that each document describes a single conceptual entity.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Motivation</title>
      <p>Suppose we have a JSON/mongoDB document, and an ontology attaching semantics to (most)
ifelds in JSON objects (called “keys” in the JSON definition; for the rest of this paper we reserve
the word “key” for database-like keys). More concretely we treat the fields in JSON objects as
(functional) roles in an underlying DL and use a TBox to add additional appropriate concept
identifiers for the domain of the document. For example, for JSON document</p>
      <p>
        We are interested in asking conjunctive queries over the document, with answers being
returned in some “answer language” ℒ. We could simply create distinct identifiers for
each node in the JSON tree, and use roles (obtained from the fields of JSON objects) to connect
them, resulting in an ABox, which in the above case might contain an assertion (id434,25)
: age. In this case, a simple query like q(P) :- age(P,25) would return id434, which is
quite meaningless without laboriously tracing back the creation of the ABox; and this answer
makes no connection with the knowledge in the ontology. A more desirable answer would use
the TBox, and return something like PERSON with fname=”John” and lname=”Smith”. This issue,
and many others concerning the appropriate choice of description for objects in query answers
was first addressed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], where the notion of “singular referring expression” was introduced.
It stood for a concept description that was guaranteed to denote a single individual.
      </p>
      <p>
        Given the use of a referring expression in ℒ to, among others, avoid meaningless object
ids, another paper [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] suggested doing a similar thing in the ℒ: replacing the ABox with a
“CBox”, where singular referring expressions are used to state assertional facts as concepts the
KB knows about. For example, the JSON fragment above could be captured by the concept
∃ fname.{"John"} ⊓ ∃ lname.{"Smith"} ⊓ ∃ age.{"25"} ⊓
∃ wife.(∃ fname.{"Mary"} ⊓ ∃ lname.{"Smith"})
Here, nominal concepts play a central role, as do key constraints for singularity, and a general
rule that CBox concepts cannot have empty interpretations.
      </p>
      <p>
        An algorithm was given in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for computing certain answers to conjunctive queries, which
returns singular referring expressions appearing in the CBox. This work was carried out in
a dialect of the FunDL family of description logics [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. FunDL and its dialects replace roles
with (possibly partial) unary functions called features, reify general roles, and always include a
so-called path functional dependency (PFD) concept constructor to express constraints that are
equality generating (including keys). In particular, the dialect used for these purposes in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] has
the property that DL reasoning and query answering are both polynomial-time (in the size of
the underlying knowledge base). The above paper also gave, as an example of CBox use, one
way to represent a JSON document (in particular, for a document in a MongoDB collection), as
a singular concept description in FunDL.
      </p>
      <p>
        Example 1 (from [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]). Consider the case where PERSON is the name of a MongoDB JSON collection
with a value as given in Figure 1. The PERSON document is captured by a CBox containing the
following concept description expressed in terms of FunDL.
      </p>
      <p>Intuitively, JSON values are mapped to concepts as follows: (a) primitive values to nominals,
(b) (compound) objects to conjunctions of existential restrictions of features corresponding to
the field names of the (mapping of) values, and (3) arrays (treated as sets) to multi-valued roles
reified via the features dom and ran (see Definition 4).</p>
      <p>One can infer that a document would have the above-mentioned singularity property by
asserting in a FunDL TBox that collection names (person in our case) are unique.</p>
      <p>
        Since in our case query answers are elements of the CBox, the above translation of a full
JSON document into a single CBox entry is undesirable. For this reason, we propose to break it
up into smaller conceptual entities that make sense based on the terminology in the TBox. This
is achieved by using referring expression types (RETs) introduced in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In particular, we will
show how a combination of a TBox and an RET assignment to the primitive concepts occurring
in the TBox enable mapping an initial CBox directly obtained from a MongoDB database, as
illustrated above, to an alternative normalized CBox, as now illustrated.
      </p>
      <p>Example 2 (JSON normalization). Applying our normalization procedure to the CBox in Example 1
will then obtain the following concepts:</p>
      <sec id="sec-1-1">
        <title>DOCUMENT ⊓ ∃ collection.{"person"} ⊓ ∃ data(∃ dom− .∃ ran(PERSON ⊓ ∃ fname.{"John"} ⊓ ∃ lname.{"Smith"}) ⊓ ∃ dom− .∃ ran(PERSON ⊓ ∃ fname.{"Mary"} ⊓ ∃ lname.{"Jones"}))</title>
        <sec id="sec-1-1-1">
          <title>PERSON ⊓ ∃ fname.{"John"} ⊓ ∃ lname.{"Smith"} ⊓</title>
          <p>∃ age.{"25"} ⊓ ∃ wife.∃ fname{"Mary"} ⊓
∃ phone.∃ dom− .∃ ran(PHONE ⊓ ∃ dnum{"212 555-1234"})</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>PERSON ⊓ ∃ fname.{"Mary"} ⊓ ∃ lname.{"Jones"} ⊓</title>
          <p>∃ salary.{"$150000CAD"} ⊓ ∃ spouse.∃ fname{"John"} ⊓
∃ phone.∃ dom− .∃ ran(PHONE ⊓ ∃ dnum{"212 555-1234"}) ⊓</p>
          <p>∃ dom− .∃ ran(PHONE ⊓ ∃ dnum{"212 666-4567"}))
PHONE ⊓ ∃ dnum{"212 555-1234"} ⊓ ∃ loc.{"home"} ⊓ ∃ colour.{"red"}
PHONE ⊓ ∃ dnum{"212 555-4567"} ⊓ ∃ loc.{"work"}
In the above, the underlined parts of these concepts serve as referring expressions identifying entities,
while the remainder of the concept tells us facts about the entities, using (the dash-underlined)
referring expressions when needed, to record such facts. For example, observe how references to
phone entities in phone facts about persons require only dnum facts about phones. □
Our contributions are as follows.
1. We show how a JSON document (or a MongoDB collection) can be abstracted as a concept
description, as illustrated in Example 1, and contrast this way of attaching a meaning or
semantics with other proposals.
2. We show how an TBox can attach meaning to such concept descriptions (and therefore
to the JSON documents).
3. We describe the normalization procedure which uses the given TBox and a referring
expression type assignment in order to extract additional intuitively reasonable CBox
subconcepts, as illustrated in Example 2.
4. We also show how information about the same entity can be consolidated even if it was
originally recorded in diferent parts of the JSON document.
5. Finally, we present a more efective way of diagnosing an admissibility property of a</p>
          <p>CBox that ensures interpretations of referring expressions are indeed singular.
All of the above tasks are accomplished by relying solely on reasoning about equalities and
concept memberships of objects corresponding to values in the input JSON document with
respect to the DL TBox. This sets our approach apart from many other approaches that
commonly rely on mapping and transformation rules.</p>
          <p>The paper is organized as follows: Section 2 provides the needed background relating to
FunDL and to referring expressions. Section 3 then outlines the main results of this paper
relating to the ability to identify subdocuments relating to identifiable entities and subsequent
separation of these entities in separate CBox entries/documents. We conclude with a brief
overview of related work and with suggestions for follow-on research.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Definitions and Background</title>
      <p>We now formally define the artifacts introduced in our introductory comments, beginning with
a general definition of concept descriptions for members of the FunDL family of DLs with
PTIME complexity of logical consequence.1 Recall that members of this family replace roles
with partial functions, and that concept descriptions not only occur in a TBox but also serve as
referring expressions in a CBox.</p>
      <p>
        Definition 1 (FunDL Concepts, Referring Expressions and Knowledge Bases). Let F and PC be
sets of feature names and primitive concept names, respectively. A path expression is defined by
1Some additional conditions must hold on PFDs and on conjunctions; see [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ] for details.
 ::= ⊥
|  : Pf1, ..., Pf → Pf0
| ⊤
| A
| ∃Pf.
| 1 ⊓ 2
| {}
| ∃ − 1.
      </p>
      <p>Semantics: Defn of “(· )ℐ ”
∅
{ | ∀.(( ∈ ℐ ∧ (⋀︀=0{, } ⊆ (∃Pf.⊤)ℐ )
(⋀︀=1 Pfℐ () = Pfℐ ())) → (Pf0ℐ () = Pf0ℐ ()))}
(bottom)
(PFD)
△ℐ
Aℐ ⊆ △ ℐ
{ | ∃.( ∈ ℐ ∧ Pfℐ () = )}
1ℐ ∩ 2ℐ
{ℐ }
{ ℐ () |  ∈ ℐ }
(top)
(primitive concept; A ∈ PC)
(value restriction)
(conjunction)</p>
      <p>(nominal)
(qualified inverse feature)
the grammar “Pf ::= . Pf | id ” for  ∈ F. A concept description is defined by the grammar on
the left-hand-side of Fig. 2.2</p>
      <p>An inclusion dependency is an expression of the form 1 ⊑ 2, where  is parsed by the first
six productions in Fig. 2. A terminology (TBox)  consists of a finite set of inclusion dependencies.
A referring expression is a concept description  parsed by the last six productions in Fig. 2. A
concept box (CBox)  consists of a finite set of referring expressions. A knowledge base  is a
TBox/CBox pair ( , ).</p>
      <p>The semantics of concept descriptions and path expressions is defined with respect to a structure
ℐ = (△ℐ , · ℐ ), where △ℐ is a domain of “objects” and · ℐ an interpretation function that fixes
the interpretations of primitive concepts  to be subsets of △ℐ and primitive features  to be
partial functions  ℐ : △ℐ → △ℐ . The interpretation is extended to path expressions, id ℐ = . ,
(. Pf)ℐ = Pfℐ ∘  ℐ , in the natural way, and derived concept descriptions  as defined in the centre
column of Fig. 2.</p>
      <p>An interpretation ℐ satisfies an inclusion dependency 1 ⊑ 2 if 1ℐ ⊆ 2ℐ , and is a model
of a TBox  if it satisfies all inclusion dependencies in  . ℐ is a model of a knowledge base 
= ( , ), written ℐ |= , if it satisfies  and also that |ℐ | &gt; 0 holds for every  ∈ .</p>
      <p>Given a TBox  , a referring expression  is singular with respect to  if |ℐ | ≤ 1 for all
interpretations ℐ that are models of  .</p>
      <p>The logical implication problem asks if  |= 1 ⊑ 2 holds, that is, if 1 ⊑ 2 is satisfied in
all models of . □
Definition 2 (Admissibility and Query Answers). Let  = ( , ) be a FunDL knowledge base
and  = {(1, . . . , ) |  } a conjunctive query. The CBox  is admissible for  if each  ∈  is
a referring expression that is singular with respect to  . (Thus, if  is consistent and  is admissible
for  , then |ℐ | = 1 for any  ∈  and any model ℐ for which ℐ |= .)</p>
      <p>2A variety of equality generating dependencies, including keys, can be expressed with the use of a path functional
dependency (PFD) concept description generated by the second production of this grammar.</p>
      <p>A k-tuple of referring expressions (1, . . . , ) is a certain answer to  in ( , ) if
 |= ∃1, . . . , .( ∧ 1(1) ∧ . . . ∧ ())
for {1, . . . , } ⊆  .</p>
      <p>
        The second artifact introduced in our introduction relates to so-called referring expression
types (RETs) introduced in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In this earlier work, such types were attached to the free variables
of a conjunctive query, and denoted a space of well-formed formulae  with one free variable,
over a given FO signature consisting of unary and binary predicates, that were eligible referring
expressions for the variable. Such types are essentially patterns of possible  , in our case,
patterns of possible concept descriptions , and are now attached to primitive concepts by a
user defined referring expression type assignment (RTA). They determine a set of possible concept
descriptions that are eligible referring expressions for subdocuments. We illustrate this below
for our running example, but leave the presentation on how this is accomplished to Section 3.
Definition 3 (Referring Expression Types and Assignments). A referring expression type is
defined by the following grammar: 3
      </p>
      <p>::= A | ∃Pf. |  ⊓  | {?} |  ; 
A referring expression type assignment (RTA) over a TBox  is partial function mapping primitive
concepts A occurring in  to a referring expression type RTA(A). We define a language of referring
expressions inhabiting , ℒ(), as follows:</p>
      <p>ℒ(A) = {A}
ℒ(∃Pf.) = {∃Pf. |  ∈ ℒ()}
ℒ(1 ⊓ 2) = {1 ⊓ 2 | 1 ∈ ℒ(1) and 2 ∈ ℒ(2)}</p>
      <p>ℒ({?}) = {{} |  is a constant symbol}
ℒ(1; 2) = ℒ(1) ∪ ℒ(2)
Example 3 (CBox normalization). Let CBox  consist of the single referring expression in
Example 1 obtained from the MongoDB collection given earlier, and let TBox  consist of the following
inclusion dependencies:
□
□
(∃ collection.⊤) ⊓ (∃ data.⊤)
(∃ fname.⊤) ⊓ (∃ lname.⊤)</p>
      <p>∃ dnum.⊤
DOCUMENT</p>
      <p>PERSON</p>
      <p>PHONE
PERSON
⊑
⊑
⊑
⊑
⊑
⊑
⊑</p>
      <p>DOCUMENT
PERSON
PHONE</p>
      <sec id="sec-2-1">
        <title>DOCUMENT : collection → id</title>
      </sec>
      <sec id="sec-2-2">
        <title>PERSON : fname, lname → id</title>
        <p>
          PHONE : dnum → id
∃ wife.PERSON
3This is a pattern language obtained by abstracting nominals in referring expressions and by admitting a final
production to express preference among referring expressions [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
        <p>Our normalization procedure presented in the next section, when given the knowledge base  =
( , ) together with the following RTA assignment, will then replace  in  by the CBox in
Example 2 of our introduction:</p>
        <p>RTA(DOCUMENT) =</p>
        <p>RTA(PERSON) =</p>
        <p>RTA(PHONE) =</p>
      </sec>
      <sec id="sec-2-3">
        <title>DOCUMENT ⊓ ∃ collection.{?} PERSON ⊓ ∃ lname.{?} ⊓ ∃ fname.{?}</title>
        <p>PHONE ⊓ ∃ dnum.{?}</p>
        <p>Mapping a JSON value to a referring expression in a CBox is straightforward with FunDL
concepts. The following definition of ToConcept provides the details. (Recall that Example 1
in our introduction illustrates an invocation of ToConcept on a JSON collection.) Some
observations and reminders: (1) this mapping assumes any JSON value, including an array, will map
to some element of an underlying domain; (2) the mapping relies entirely on interpreting field
names in field-value pairs comprising JSON objects as feature names; and (3) arrays (treated as
sets) are mapped to multi-valued roles reified via the features dom and ran.
Definition 4 (ToConcept). An arbitrary JSON value is mapped to a CBox referring expression as
follows:
□
□</p>
        <p>ToConcept("s") ↦→ {"s"}</p>
        <p>ToConcept(null) ↦→ ⊤
ToConcept({"k1" : 1, . . . , "kn" : }) ↦→ ∃ k1. ToConcept(1) . . . ⊓ ∃ kn. ToConcept()
ToConcept([1, . . . , ]) ↦→ ∃ dom− .∃ ran. ToConcept(1) ⊓
. . . ⊓ ∃ dom− .∃ ran. ToConcept()
where the first case covers all JSON values that are strings, numerics, and Booleans.
□</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. CBox Normalization</title>
      <p>Our CBox normalization procedure derives from a pair of normalization rules presented in
Section 3.2. To enable references to sub-concepts in a concept description required by our
formulation of these rules, we define the mapping ToAbox.</p>
      <p>Definition 5 (ToABox). An arbitrary referring expression  is mapped to an ABox and a mapping
from constant symbols  in this ABox to nodes in the syntactic tree of  as follows:
ToAbox( : {}) ↦→ { = }</p>
      <p>ToAbox( : A) ↦→ {A()}, A primitive</p>
      <p>ToAbox( : ∃.) ↦→ { () = } ∪ ToAbox( : ),  fresh</p>
      <p>ToAbox( : ∃ − 1.) ↦→ { () = } ∪ ToAbox( : ),  fresh</p>
      <p>ToAbox( : 1 ⊓ . . . ⊓ ) ↦→ ⋃︀=1{ = } ∪ ToAbox( : ),  fresh
We define ToAbox() = ⋃︀∈ ToAbox( : ),  fresh for each .</p>
      <p>The ToAbox() function converts an input concept  to an ABox by traversing the syntactic
structure of the concept, assigning distinct constant symbols  to subconcepts of , and then
replacing these subconcepts by atomic ABox assertions.</p>
      <p>Definition 6 (Context). Let  be a concept description. We use the notation [′ : ′] to denote a
subconcept ′ of the concept  where ′ is the constant symbol assigned to ′ by ToAbox( : ).
For the top-level concept we simply use the context [ : ].</p>
      <p>A projection function ToRE that uses a referring expression type  to generate a referring
expression  in ℒ() and holding for a particular individual  in a knowledge base (or
producing an undefined value if no such  exists) is now defined. (Observe the use of an
auxiliary recursive function with the same name in the definition that takes a path function Pf
as a third argument.)
Definition 7 (Projection on ). Let  be a consistent knowledge base and  a constant. We define
a projection function ToRE(, ) for a referring expression  as the result of the following
recursive definition of ToRE(, , id ) on the structure of :</p>
      <p>ToRE(, A, Pf) = A if  |=  : ∃Pf.A, undefined otherwise</p>
      <p>ToRE(, {?}, Pf) = {} if  |=  : ∃Pf.{} for some , undefined otherwise
ToRE(, ∃Pf′., Pf) = ∃Pf′.ToRE(, , Pf . Pf′)
ToRE(, 1 ⊓ 2, Pf) = ToRE(, 1, Pf) ⊓ ToRE(, 2, Pf) if both defined</p>
      <p>
        ToRE(, 1; 2, Pf) = ToRE(, 1, Pf) if defined, ToRE(, 2, Pf) otherwise
The following is a simple consequence of this and our previous definitions. Also, see earlier
work in [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ] for efective ways of computing the second and fourth base cases.
Lemma 1. For any constant , any , and any consistent , ToRE(, ) ∈ ℒ().
      </p>
      <p>It will also be useful to have a simplification procedure for referring concepts. The following
definition of such a procedure will sufice for illustrative purposes, and clearly preserves concept
equivalence.</p>
      <p>Definition 8 (Concept Simplification) . We write Simplify() to denote an exhaustive application
of the following to referring expression :
1. If an -way conjunction contains ∃.1 and ∃.2, replace both conjuncts by ∃.1 ⊓ 2.
2. If an -way conjunction contains duplicate conjuncts, remove one of the conjuncts. □
 ⊓ (1; 2) ↦→  ⊓ 1;  ⊓ 2
(1; 2) ⊓  ↦→ 1 ⊓ 1; 2 ⊓ 
∃Pf.(1; 2) ↦→ ∃Pf.1; ∃Pf.2
□
□
3.1. CBox Admissibility
In this subsection, we show how, given a TBox  , one can statically test for admissibility of
any CBox obtained by the normalization rules given in Subsection 3.2 that follows. This is
achieved by a mapping to a sequence of logical consequence problems for inclusion dependencies
expressing functional dependencies with PFDs that are induced by a given RTA assignment.
We begin by defining a normalization of an  that preserves ℒ().</p>
      <p>
        Definition 9 (Normalized Types; from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). We write Norm() to refer to an exhaustive
application of the following rewrite rules to :
      </p>
      <p>The following are simple consequences: (1) ℒ() = ℒ(Norm()), and (2) all preference
operators (“;”) are at the top level. We call the maximal “;”-free parts of Norm() preference-free
components.</p>
      <p>To statically test for singularity of referring expressions generated by the ToRE function for
a particular referring expression type, we use the following auxiliary definitions:
Pfs({?}) = {id }</p>
      <p>Pfs(A) = { }</p>
      <p>Pfs(∃Pf′.) = {Pf′ . Pf | Pf ∈ Pfs()}
Pfs(1 ⊓ 1) = Pfs(1) ∪ Pfs(2)
Con({?}) = ⊤</p>
      <p>Con(A) = A</p>
      <p>
        Con(∃Pf′.) = ∃Pf′.Con()
Con(1 ⊓ 1) = Con(1) ⊓ Con(2)
These functions extract a set of paths leading to nominals and a concept from a preference-free
referring expression type. Altogether, we are now able to formulate the singularity test following
the ideas presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], Theorem 20:
Theorem 1. Let  be a TBox and  a referring expression type. Then all referring expressions
in ℒ() are singular if  |= Con(′) ⊑ Con(′) : Pfs(′) → id for every preference-free
component ′ of Norm().
      </p>
      <p>Our static test of admissibility of any CBox generated by our normalization rules then follows
by applying the above to any  in the range of a programmer supplied RTA.
3.2. CBox Normalization Rules
We now have the necessary machinery to present our two rules for normalizing the CBox of a
given knowledge base  = ( , ) and referring expression type assignment RTA. Our first
main rule extracts sub-concepts of a given CBox concept  as an additional separate CBox
concept.</p>
      <p>Definition 10 (Subdocument Extraction). Assume  is a concept in  which contains a
subconcept ′ (i.e., [ : ′]) corresponding to a JSON object. Also assume two properties hold: that
( , ToAbox()) |= (), and that RTA() is defined for primitive concept . We form a new
CBox ′ as follows</p>
      <p>′ :=  − { [ : ′]} ∪ {[ : ToRE(, RTA())], ToRE(, RTA()) ⊓ ′}</p>
      <p>Intuitively, we replace a single monolithic concept  in  in which a subconcept ′ was
identified as a representation of an  entity by a modified variant of  in which ′ has been
replaced by its referring expression. In addition we create a new CBox concept ToRE(, ()) ⊓
′ for this entity.</p>
      <p>
        Note that the choice of  above is non-deterministic, but does not afect the soundness of the
extraction. However, this non-determinism can result in diferent referring expressions used to
identify the same subdocument. Although beyond the scope this paper, in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], we described a
technique that allows one to diagnose that a given RTA has anticipated any such ambiguity,
that any choice of  must still lead to the same syntactic referring expression.4 We refer to
such an RTA as identity resolving.
      </p>
      <p>Also note that, due to the properties of referring expressions (singularity in particular) we
have ( , ToAbox(′)) |=  =  for the above-introduced concepts [ : ToRE(, RTA())]
and [ : ToRE(, RTA()) ⊓ ′] in ′. Hence, the models of ( , ) and ( , ′) will coincide.</p>
      <p>The second of our two rules replaces two CBox referring expressions with a single referring
expression when co-reference is implied. Note that, were the given RTA identity resolving, we
would always have  = ′.</p>
      <p>Definition 11 (Equivalent Subdocument Merge). Let [ :  ⊓ ] and [ : ′ ⊓ ′] be two
concepts in  such that ( , ToAbox()) |=  = . We replace  with
′ :=  − { [ :  ⊓ ], [ : ′ ⊓ ′]} ∪ {[ :  ⊓ Simplify( ⊓ ′)}.
□</p>
      <p>Our main results now follow.</p>
      <p>Theorem 2. Let  be a CBox in a consistent knowledge base  = ( , ) and ′ a CBox obtained
by applying the Subdocument Extraction or the Equivalent Subdocument Merge rules. Then
every model of  is also a model of ( , ′) and vice versa.</p>
      <p>Strictly speaking, this is not true for ( , ToAbox()) and ( , ToAbox(′)), but the models of
these two knowledge bases will only difer in what constants are assigned to what subconcepts
in  and ′, respectively.</p>
      <p>Theorem 3. Let  be an admissible CBox in a consistent knowledge base  = ( , ) and ′ a
CBox obtained by applying the Subdocument Extraction or the Equivalent Subdocument Merge
rules. Then ′ is admissible.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Summary Comments</title>
      <p>
        The main contribution of this paper is showing how JSON-like data sources can be abstracted
as concept descriptions in an appropriate DL in a very generic way. This enables their
domainspecific semantics to be naturally captured as a TBox in the same logic, which then allows one
to draw on mature reasoning services that have been developed for DLs [
        <xref ref-type="bibr" rid="ref4 ref8">8, 4</xref>
        ]. In addition,
our approach utilizes referring expressions [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] as the means of identifying entities described in
such data sources. This is crucial to the proposal’s ability to detect multiple subdocuments that
provide information about the same entity. Notably, this is achieved completely automatically
since the appropriate equalities will be entailed by the knowledge base consisting of a
domainspecific TBox and the data sources captured as concepts in a CBox.
      </p>
      <p>Our primary technical contribution is our ability to separate entities into separate documents
and to consolidate documents that provide information about the same entity, also by appeal to
referring expressions and to entailment in the underlying DL.</p>
      <p>
        4Essentially, this entails ensuring that preference in RTA(), for any primitive concept , exhaustively accounts
for any primitive concept  for which there exists some interpretation ℐ for which ( ⊓ )ℐ is non-empty.
4.1. Related Work
There are many papers that take as input a semi-structured document, in JSON or XML
(sometimes with a schema) plus an ontology in a DL TBox, and create individual instance descriptions
in an ABox; for a survey see [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Usually, this is intended for just adding semantics to the
document, but reasoning could be used to detect inconsistencies, such as a situation where two
properties with disjoint domains apply to the same individual. For example, the use of XPath to
navigate XML documents and detect instances of objects belonging to certain OWL classes has
been presented in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In particular, their approach and implementation, i.e., their JXML2OWL
framework, maps XML documents to existing OWL ontologies via explicit mapping rules that
use XPath. Out approach, in contrast, uses a generic mapping of JSON to concept descriptions
in a DL and then uses the full power of reasoning in the DL to capture such mappings and to
achieve a variety other goals, including detection of entities and entity-based equality between
subdocuments.
      </p>
      <p>
        The closest to our work is a virtual OBDA architecture, where data is stored in a JSON
MongoDB repository [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The architecture extends the basic OBDA architecture by introducing
a relational view (an ABox) over MongoDB with respect to a set of type constraints. Rewritten
queries by the OBDA framework over the relational view are translated using a fragment of
MongoDB aggregate queries. However, as far as we are aware, functional dependencies are not
involved in identification issues, nor in separating entities into separate documents.
      </p>
      <p>
        There is a great deal of work that attempts to synthesize schemata (in various formalisms)
from the semi-structured data [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. However, these approaches are orthogonal to the results in
our paper.
4.2. Future work and Extensions
There are many avenues for future research:
1. Additional CBox entries generated by reified roles: in Example 2, we could also have
created additional CBox entries for (reified) phone ownership, e.g.,
HAS-PHONE ⊓ ∃ dom.phone− 1.(PERSON ⊓ ∃ fname.{"John"} ⊓ ∃ lname.{"Smith"})
⊓ ∃ ran.(PHONE ⊓ ∃ dnum{"212 555-1234"}).
      </p>
      <p>
        This, however, requires generalizing the PFD concept constructor and path descriptions
to allow for a limited use of inverse features.
2. Diagnosis via consistency and pinpointing/data cleaning: inconsistency of the knowledge
base consisting of the domain knowledge  and the CBox ToConcept() indicates that
either our domain knowledge does not accurately capture the properties of the documents
or that the documents themselves contain erroneous data. Axiom pinpointing [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and
data cleaning [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] can help in this situation.
3. Set-valued properties and referring expressions: another extension relates to extending
the RTAs to allow identification to be based on set-valued properties/values. Such an
extension, however, requires extensions to the equality-generating constraints in the
underlying DL and the ToRE operation.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Borgida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          , G. Weddell,
          <article-title>On referring expressions in query answering over first order knowledge bases</article-title>
          ,
          <source>in: Proc. KR</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>319</fpage>
          -
          <lpage>328</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          ,
          <article-title>Identity resolution in ontology based data access to structured data sources</article-title>
          , in: A.
          <string-name>
            <surname>C. Nayak</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Sharma (Eds.),
          <source>PRICAI 2019: Trends in Artificial Intelligence - 16th Pacific Rim International Conference on Artificial Intelligence</source>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>11670</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2019</year>
          , pp.
          <fpage>473</fpage>
          -
          <lpage>485</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>McIntyre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          , FunDL
          <article-title>- A family of feature-based description logics, with applications in querying structured data sources</article-title>
          , in: Description Logic,
          <string-name>
            <given-names>Theory</given-names>
            <surname>Combination</surname>
          </string-name>
          , and
          <string-name>
            <surname>All</surname>
          </string-name>
          That - Essays Dedicated to Franz
          <source>Baader on the Occasion of His 60th Birthday</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>404</fpage>
          -
          <lpage>430</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>McIntyre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Borgida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          ,
          <article-title>On limited conjunctions and partial features in parameter-tractable feature logics</article-title>
          ,
          <source>in: The Thirty-Third AAAI Conference on Artificial Intelligence</source>
          ,
          <source>AAAI</source>
          <year>2019</year>
          ,
          <year>2019</year>
          , pp.
          <fpage>2995</fpage>
          -
          <lpage>3002</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pound</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          , J. Wu,
          <article-title>Query algebra and query optimization for concept assertion retrieval</article-title>
          , in: V.
          <string-name>
            <surname>Haarslev</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Toman</surname>
          </string-name>
          , G. E. Weddell (Eds.),
          <source>Proceedings of the 23rd International Workshop on Description Logics (DL</source>
          <year>2010</year>
          ), Waterloo, Ontario, Canada, May 4-
          <issue>7</issue>
          ,
          <year>2010</year>
          , volume
          <volume>573</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pound</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. Wu,</surname>
          </string-name>
          <article-title>An assertion retrieval algebra for object queries over knowledge bases</article-title>
          , in: T. Walsh (Ed.),
          <source>IJCAI 2011, Proceedings of the 22nd International Joint Conference on Artificial Intelligence</source>
          , Barcelona, Catalonia, Spain,
          <source>July 16-22</source>
          ,
          <year>2011</year>
          , IJCAI/AAAI,
          <year>2011</year>
          , pp.
          <fpage>1051</fpage>
          -
          <lpage>1056</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Borgida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Toman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Weddell</surname>
          </string-name>
          ,
          <article-title>On referring expressions in information systems derived from conceptual modelling</article-title>
          , in: I.
          <string-name>
            <surname>Comyn-Wattiau</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Tanaka</surname>
            , I. Song,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Yamamoto</surname>
          </string-name>
          , M. Saeki (Eds.),
          <source>Conceptual Modeling - 35th International Conference, ER</source>
          <year>2016</year>
          , Gifu, Japan,
          <source>November 14-17</source>
          ,
          <year>2016</year>
          , Proceedings, volume
          <volume>9974</volume>
          of Lecture Notes in Computer Science,
          <year>2016</year>
          , pp.
          <fpage>183</fpage>
          -
          <lpage>197</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Baader</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>McGuinness</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Patel-Schneider</surname>
          </string-name>
          ,
          <article-title>The Description Logic Handbook: Theory, Implementation, and</article-title>
          <string-name>
            <surname>Applications</surname>
          </string-name>
          , Cambridge University Press,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Hacherouf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. N.</given-names>
            <surname>Bahloul</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Cruz</surname>
          </string-name>
          ,
          <article-title>Transforming xml documents to owl ontologies: A survey</article-title>
          ,
          <source>Journal of Information Science</source>
          <volume>41</volume>
          (
          <year>2015</year>
          )
          <fpage>242</fpage>
          -
          <lpage>259</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>T.</given-names>
            <surname>Rodrigues</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Cardoso</surname>
          </string-name>
          ,
          <article-title>Mapping xml to exiting owl ontologies</article-title>
          , in: International Conference WWW/Internet, Citeseer,
          <year>2006</year>
          , pp.
          <fpage>72</fpage>
          -
          <lpage>77</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E.</given-names>
            <surname>Botoeva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Cogrel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rezk</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Xiao, OBDA beyond relational dbs: A study for mongodb</article-title>
          , in: M.
          <string-name>
            <surname>Lenzerini</surname>
          </string-name>
          , R. Peñaloza (Eds.),
          <source>Proceedings of the 29th International Workshop on Description Logics</source>
          , Cape Town, South Africa,
          <source>April 22-25</source>
          ,
          <year>2016</year>
          , volume
          <volume>1577</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Peñaloza</surname>
          </string-name>
          ,
          <article-title>Axiom pinpointing</article-title>
          , in: G. Cota,
          <string-name>
            <given-names>M.</given-names>
            <surname>Daquino</surname>
          </string-name>
          ,
          <string-name>
            <surname>G. L.</surname>
          </string-name>
          Pozzato (Eds.),
          <source>Applications and Practices in Ontology Design, Extraction, and Reasoning</source>
          , volume
          <volume>49</volume>
          of
          <article-title>Studies on the Semantic Web</article-title>
          , IOS Press,
          <year>2020</year>
          , pp.
          <fpage>162</fpage>
          -
          <lpage>177</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>I. F.</given-names>
            <surname>Ilyas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Chu</surname>
          </string-name>
          , Data Cleaning, ACM,
          <year>2019</year>
          . URL: https://doi.org/10.1145/3310205. doi:
          <volume>10</volume>
          . 1145/3310205.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>