<!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>Maintaining Relational Consistency in a Graph-Based Place Database</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Hao Chen</string-name>
          <email>hchen@student.unimelb</email>
          <email>hchen@student.unimelb.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria Vasardani</string-name>
          <email>mvasardani@unimelb</email>
          <email>mvasardani@unimelb.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stephan Winter</string-name>
          <email>winter@unimelb</email>
          <email>winter@unimelb.</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Department of Infrastructure Engineering,</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The University of Melbourne</institution>
          ,
          <country country="AU">Australia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>edu.au</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In: B. Veenendaal and A. Kealy (Eds.): Research@Locate'15, Brisbane, Australia, 10-12 March 2015, published at http://ceur-ws.org</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>People
use
natural
language
(NL)
descriptions
to
communicate spatial information, mostly referring to space
in qualitative terms. In this research, a graph database is
used to store such qualitative spatial information as derived
from NL descriptions. It focuses on developing and testing
qualitative spatial reasoning
mechanisms to
maintain
relational consistency within the graph database. The study
provides a first step into using a graph database to storing
and querying qualitative spatial data from
NL
place
descriptions, and provides some insights for the system
implementation.</p>
    </sec>
    <sec id="sec-2">
      <title>1 Introduction</title>
      <p>People represent environment in natural language (NL) descriptions typically in a qualitative way of spatial
features and their relationships, such as “Building A is to the left side of Building B” or “The campus is a little bit
north from the city”. Such qualitative information could provide an intuitive approach for representing human
spatial knowledge. Since this knowledge can be extracted in the form of triplets of locatum-relationship-relatum (as
in “campus”-“north of”-“city”) a formal model of two nodes and a linking edge comes to mind. Graph databases,
which have already proven useful for modelling qualitative relationships in other areas, present a way to store and
query these triplets.</p>
      <p>
        This research focuses on building such a graph database that can store triplets while maintaining relational
consistency. The research will go back to Qualitative Spatial Reasoning (QSR) for consistency checking. QSR has
been used in other contexts, such as robot navigation, e.g.
        <xref ref-type="bibr" rid="ref16">(Moratz, Nebel et al. 2003)</xref>
        , general QSR calculi in AI,
e.g.
        <xref ref-type="bibr" rid="ref10 ref11 ref23 ref7 ref8 ref9">(Frank 1991, Freksa 1992, Zimmermann and Freksa 1996)</xref>
        , or for systems modelling NL descriptions, e.g.
        <xref ref-type="bibr" rid="ref1 ref2">(Belouaer, Brosset et al. 2013, Basiri, Amirian et al. 2014)</xref>
        .
      </p>
      <p>The hypothesis of this study is that a graph-based place database can preserve relational consistency in
transactions about triplets representing locata, qualitative spatial relationships, and relata. It is anticipated that, as an
outcome, a graph-based place database is able to identify and flag if new input is violating the current consistency
and causing logical contradictions. For this purpose the paper studies the relationships and calculi in question,
suggests reasoning constraints and algorithms for consistency checking, and tests these algorithms.</p>
      <p>The rest of this paper is structured as follows: Section 2 discusses related work and tools. Section 3 explains the
methodology for data modelling, as well as reasoning configurations to preserve relational consistency. Section 4
explains the experiments and provides a demonstration of the implemented system. The experiment results
presented in Section 5 and discussed in Section 6. Section 7 includes conclusions and suggestions of future work.
Copyright © by the paper’s authors. Copying permitted only for private and academic purposes.</p>
      <sec id="sec-2-1">
        <title>2.1 Graph database as a NoSQL database</title>
        <p>
          The NoSQL database family (NoSQL means ‘not only SQL’) includes a variety of database management
systems that are not restricted to relational SQL models. It is not in contrast to but rather complements relational
databases
          <xref ref-type="bibr" rid="ref1">(Basiri, Amirian et al. 2014)</xref>
          . Graph databases are one of the major databases in the NoSQL family other
than key-value, document and column databases
          <xref ref-type="bibr" rid="ref19">(Tiwari 2011)</xref>
          . Graph databases are based on graphs
          <xref ref-type="bibr" rid="ref3">(Biggs, Lloyd
et al. 1986)</xref>
          and employ nodes and edges with properties to store data and their relations.
        </p>
        <p>
          Graph databases have two advantages in modelling rich-connected data, compared to relational databases
(
          <xref ref-type="bibr" rid="ref12">Güting 1994</xref>
          , Wiebrock, Wittenburg et al. 2000). First, they provide a natural and efficient way for network-based
data modelling using nodes and edges, while relational databases are more suitable for modelling set-based data.
Second, querying connected data can be cheaper in a graph database by traversing paths rather than by a join
operation (or even recursive join) in a relational database.
        </p>
        <p>Graph databases are today used in modelling information from social networks, such as Facebook, as well as
general knowledge, for example the Google Knowledge Graph. In this study, a graph database is used to model
place information since it provides a natural, suitable, efficient and flexible way for modelling spatial objects and
the qualitative spatial relationships among them, with no need for pre-defining a tabular schema as in a relational
database.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Modelling spatial information in a graph structure</title>
        <p>
          The concept of triplets has been widely utilized
          <xref ref-type="bibr" rid="ref13 ref18 ref22">(Wiebrock, Wittenburg et al. 2000, Sproat, Coyne et al. 2010,
Kordjamshidi, Frasconi et al. 2012)</xref>
          . One specific triplet, that of locatum-qualitative spatial relationship-relatum, has
been introduced as the spatial property graph
          <xref ref-type="bibr" rid="ref20">(Vasardani, Timpf et al. 2013)</xref>
          . It consists of the spatial object to be
located (the locatum L), the reference object (the relatum R) and the qualitative spatial relationship between them
(r). So far, the spatial property graph has been used for constructing plausible sketch maps
          <xref ref-type="bibr" rid="ref20">(Vasardani, Timpf et al.
2013)</xref>
          . Belouaer et al. introduced another rule-based approach to generate a spatial semantic network inferred from
verbal descriptions
          <xref ref-type="bibr" rid="ref2">(Belouaer, Brosset et al. 2013)</xref>
          . Both approaches focus on identifying semantic similarity among
stored nodes. Our study, on the other hand, focuses on the relationships instead of spatial objects.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3 Qualitative Spatial Reasoning and Calculi</title>
        <p>
          QSR is a constraint-based process that enables spatial intelligence to reasoning about space
          <xref ref-type="bibr" rid="ref4 ref5">(Cohn and Hazarika
2001, Dylla, Frommberger et al. 2006)</xref>
          . QSR algorithms can be used to solve constraint-based problems by
reasoning on different types of qualitative spatial relations.
        </p>
        <p>
          In this context, Frank suggested QSR with cardinal directions and qualitative distance relationships
          <xref ref-type="bibr" rid="ref10 ref9">(Frank 1991,
Frank 1992)</xref>
          . For cardinal directions he suggested a cone model (Figure 1a), half-plane models (Figure 1b), and a
neutral zone model (Figure 1c). The neutral zone model with its composition table is applied in this study, with
additional rules to increase the flexibility of natural language.
        </p>
        <p>(a)
(b)
(c)</p>
        <p>
          For qualitative distance relationships Frank discussed two-step (close, far), three-step (close, middle, far) and
multi-step systems
          <xref ref-type="bibr" rid="ref10">(Frank 1992)</xref>
          . Those systems consider qualitative distance as mappings into intervals that form a
partition of the positive real numbers, such as (for a three-step system) close = [0, 1); middle = [1, 3); far = [3, ∞)
(Figure 2a). In a linear space such relationships can be added, and dist(A,B) + dist(B,C) ≥ dist(A,C). The resulting
interval will then be mapped back to the corresponding symbols (close, middle, far) again. In place databases,
however, stored place configurations are from two-dimensional space, where nothing else than the usual triangle
inequality holds. Figure 2b shows for example a situation where “A is middle to B” and “B is middle to C” means
that A and C can be in any relationship, for example near.
        </p>
        <p>
          Freksa provided an approach for reasoning with relative direction relationships
          <xref ref-type="bibr" rid="ref11">(Freksa 1992)</xref>
          . Later,
Zimmermann and Freksa discussed composition cases
          <xref ref-type="bibr" rid="ref23">(Zimmermann and Freksa 1996)</xref>
          . However, relative direction
relations are not considered in this study, for reasons discussed in Section 3.
        </p>
        <p>
          Egenhofer et al. discussed a methodology for modelling and reasoning with topological relations
          <xref ref-type="bibr" rid="ref6 ref7 ref8">(Egenhofer and
Herring 1990, Egenhofer and Franzosa 1991)</xref>
          , known as the 4-intersection and 9-intersection models. The two
models consider whether the interior (A° andB°), the boundary (∂A and ∂B) and the exterior (A and B ) of two
spatial objects intersect, and map the different cases to topological relationships. A composition table was also
introduced for reasoning
          <xref ref-type="bibr" rid="ref6 ref7 ref8">(Egenhofer 1991)</xref>
          . An alternative model, based on first order logic instead of point-set
topology, is the Region Connection Calculus (RCC) introduced by Randell, Cui and Cohn in 1992
          <xref ref-type="bibr" rid="ref17">(Randell, Cui et
al. 1992)</xref>
          . The 4-intersection model and the RCC both distinguish the same eight relations between two simple
connected spatial objects. In this study, Egenhofer’s 4-intersection model and composition table are used.
        </p>
        <p>
          The different calculi of QSR, each of them applicable on one type of spatial relationships, have been packed into
toolboxes. For example, SparQ
          <xref ref-type="bibr" rid="ref21">(Wallgrün, Frommberger et al. 2007)</xref>
          is an integrated system which provides a
series of Qualitative Spatial Calculi functionalities and aims at supporting tasks related to constraint-based
reasoning and qualitative consistency-checking. In this research, however, the flexibility that comes with the use of
natural language requires a critical discussion and extension of such calculi.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 A relationally consistent graph-based place database</title>
      <p>Triplets of place information, as extracted from NL description, can be integrated and stored in a graph database.
The graph database should only store relationships that are consistent with each other in order to avoid
contradictions in querying or reasoning, even if the information is not necessarily true according to geographic
reality. In this section, methods will be provided to maintain relational consistency.</p>
      <sec id="sec-3-1">
        <title>3.1 Modelling place information using graph database</title>
        <p>A triplet consisting of {locatum, relation, relatum}, such as {Building A, to the right of, Building B} is
represented in a graph database using two distinct nodes for locatum and relatum, and a directed edge from the
locatum to the relatum, as shown in Figure 3. In the following sections, L-r-&gt;R will be used to represent a triplet,
such as “Building A–to the right of–&gt;Building B”.</p>
        <p>Each time a new triplet is to be added, the names of the locatum and relatum will be queried to verify whether
already nodes of these names exist in the database. If the nodes already exist, the triplet is integrated in the existing
graph, otherwise new nodes are created and connected with directed edges. The graph can become a multi-graph
when more than one triplet are added with the same locatum and relatum (e.g., A–right of–&gt;B; A–west of –&gt;B).</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Relational consistency</title>
        <p>
          Relational inconsistency occurs in a graph database when two pieces of information can be derived from the
stored data that are logically contradicting. For example, if a real world situation as shown in Figure 4 is described
by “A-west of-&gt;B” and then by “B-west of-&gt;A” there is a contradiction. Contradictions can also occur over longer
cycles, such as in “A-west of-&gt;B”, “B-west of-&gt;C” and then “C-west of-A”.
R3(A, C)
          <xref ref-type="bibr" rid="ref4">(Cohn and Hazarika 2001)</xref>
          . Qualitative spatial calculi, with a limited set of expressions, may require
R3(A, C) to be a set of possible relations S3(A, C). Let us denote ∘ for the composition operation between two
Commutative law: A ∘ B = B ∘ A
Associativity law: (A ∘ B) ∘ C = A ∘ (B ∘ C)
        </p>
        <p>Distributive law: A = {A1. . A }, B = {B1. . B }, A ∘ B = ∑=1
∑

=1</p>
        <p>A
 ∘ B
relationships, an n*n composition table consists of each composition result between any two relationships in n.</p>
        <p>A table can be constructed to represent the composition results S3(A, C) . For a calculus of n possible</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.4 General reasoning configuration</title>
        <p>For the time being, any new triplet L-r-&gt;R, r must be from one of the three categories: cardinal direction,
qualitative distance, or topological relationship. All other relationships are not yet covered; they might be stored
without consistency checking, or conservatively just rejected.</p>
        <p>In order to identify relational inconsistency, any new input triplet L-r-&gt;R will be compared to existing
knowledge between L and R derived from the stored data.
a set of relationships.</p>
        <p>Definition: Given a triplet L-r-&gt;R, an existing path (EP) is a sequence of nodes and edges in the graph database
that starts from L and ends with R, while all the relationships in the path belong to the category of r.</p>
        <p>Definition: An existing knowledge (EK) is a set of derived relationships between L and R from an EP. If the
length of EP equals to one, then EK is the single relation in the EP. If the length of EP is greater than one, then for
all relationships with 1..n in EP in sequence order, EK =  1 ∘  2 ∘. .   , which could be either a single relationship or</p>
        <p>A new triplet L-r-&gt;R is regarded consistent with a database if it is relationally consistent with all EKs between L
and R. If the triplet is consistent, it will be added to the graph database; otherwise an inconsistency will be flagged.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.5 Reasoning configuration for cardinal direction relationships</title>
        <p>For cardinal directions this research adopts the neutral zone system (Figure 1c), as it is assumed that all spatial
features have a two-dimensional extend. As for any other system, each cardinal direction can be associated with a
region such that these regions form a JEPD partition of the Euclidian plane. The size of the neutral zone is defined
by the relatum R, while the locatum L in a triplet L-r-&gt;R belongs to one of the eight zones (NW, N, NE, E, SE, S,
SW and W).</p>
        <p>Table 2 shows Frank’s composition table for the neutral zone model. ‘Any’ in the table means again that any of
the eight relationships is possible. However, the composition table is not directly applied in this work. This is
because the semantics of cardinal directions in NL descriptions are more vague than a logical model suggests. For
example, when people say North, they could mean anywhere within zones of W, NW, N, NE and E—in the neutral
zone model—instead of only N, because if the half-planes of cardinal directions intersect in a valid relation, it
seems that people consider them as conceptually consistent (i.e., non contradicting), as they can generalize from the
more specific relations, to the more general and broader application region of each relation (half-planes). Therefore,
without more detailed knowledge, a certain level of uncertainty should be accepted and not be regarded as
inconsistency. For instance, in reasoning N and NW should be considered as consistent while N and S should be
regarded as inconsistent.</p>
        <p>N
NE
E
SE
S
SW
W
NW</p>
        <p>Definition: An extended cardinal direction set (ECD) is a set of consistent cardinal direction relationships given
a cardinal direction relationship r in a NL description.</p>
        <p>The ECD for any cardinal direction relationship is shown in Table 3. The table provides a set of relationships
that are regarded as relationally consistent with r. For instance, “Building A-north of-&gt;Building B” and “Building
A-east of-&gt;Building B” are considered as relationally consistent, and their half-plane intersection exists in the form
of a valid relation north-east (NE); while “Building A-north of-&gt;Building B” and “Building A-south of-&gt;Building B”
are relationally inconsistent, as obviously an intersection of their half-planes does not exist.</p>
        <p>ECDs provide a ‘tolerant’ mechanism that first stores triplets which are considered to be relationally consistent.
Then, when more triplets with new knowledge between the same two spatial objects are stored, and the number of
EP (and EK) increases, the system becomes less tolerant, as a new input triplet will need to be consistent with every
EK in order to be consistent with the graph database.</p>
        <p>Rule 1: Given an input triplet L-r-&gt;R and r is a cardinal direction relationship, if for every EK between L and R,
r belongs to the ECD of at least one of the elements in that EK, then the triplet is relationally consistent with the
graph database.</p>
      </sec>
      <sec id="sec-3-5">
        <title>3.6 Relative direction relationships</title>
        <p>Relative direction relationships require a reference frame for relative directions. The reference frame can be
linked to the orientation of the observer (egocentric, to my left), the orientation of the relatum (allocentric, to the left
of the front side), or be a projection of the speaker to the reference frame of the recipient (your left). Unfortunately
triplets do not provide this spatial reference frame. For instance, when someone says “A is in front of C” then this
sentence’s ambiguity with respect to the spatial reference frame cannot be resolved without further context (which
is not accessible). This is the reason why in this research reasoning mechanisms for relative direction relationships
are not provided.</p>
      </sec>
      <sec id="sec-3-6">
        <title>3.7 Reasoning configuration for qualitative distance relationships</title>
      </sec>
      <sec id="sec-3-7">
        <title>3.8 Reasoning configuration for topological relationships</title>
        <p>
          Egenhofer’ s composition table for the 4-intersection model
          <xref ref-type="bibr" rid="ref6 ref7 ref8">(Egenhofer 1991)</xref>
          is shown in Table 7. Here, ‘any’
means no more specific information can be deducted: any topological relationship is possible. The commutative law
does not apply for the composition operation between topological relationships. For instance, disjoint ∘ inside = {d,
m, i, cB, o} while inside ∘ disjoint = d.
i,cB,o
        </p>
        <p>
          The data used to test the algorithms are 731 triplets derived from 42 place descriptions collected by Vasardani et
al.
          <xref ref-type="bibr" rid="ref20">(Vasardani, Timpf et al. 2013)</xref>
          . The triplets were extracted from NL descriptions of the University of
Melbourne’s Parkville campus, given by a group of graduate students with different levels of familiarity with the
campus. These descriptions had already been pre-processed by NL parsing rules, synonym detection and
relationship classification. Of these 731, 325 triplets have a cardinal direction, a qualitative distance, or a
topological relationship.
        </p>
      </sec>
      <sec id="sec-3-8">
        <title>4.1 System overview</title>
        <p>The Neo4j community version is used in this research as local host visualization platform. The Neo4j
Python-embedded is the main module used to interact with the local database host. The system structure is shown in
Figure 5.</p>
        <p>triplets
node already
exist?</p>
        <p>no
create node
yes
checking
procedure
cardinal direction</p>
        <p>relationship
qualitative distance
relationship
topological
relationship
other</p>
        <p>Rule 1
Rule 2
Rule 3
reject</p>
        <p>no
consistent?</p>
        <p>yes
create L-r-&gt;R</p>
        <p>The experiment consists of two parts. In Part 1, during the import stage, the reasoning algorithms were applied to
identify inconsistent triplets form the set of 731. Each flagged triplet is then manually verified of whether it really
causes relational inconsistency or not. Thus, rate P1 calculated by Formula 4.2.1, is the precision of the algorithm.
For instance, if the system detects 10 inconsistent triplets, and 9 of them are verified, then P1 equals to 0.9
(maximum 1).</p>
        <p>1 =
number of verified inconsistent triplets
number of inconsistent triplets identified
(4.2.1)</p>
        <p>In Part 2, after all triplets are imported, an additional set of 60 made-up consistent and inconsistent triplets of the
three categories of relationships were input to the database. In this case it was known in advance which of the
triplets are consistent or inconsistent. Again it was tested whether the system is able to correctly accept or reject
each of them accordingly. The rate P2 calculated by Formula 4.2.2 provides another insight on the precision of the
algorithm.</p>
        <p>When querying for EPs that start from node L and end with R, a maximum path length has been set, since
computing all the paths between two nodes in a graph draws on computation time. This theoretical drawback can
only be justified by pragmatics: First, it can be observed that after just a few steps of reasoning, composition tables
in many places end with ‘any’ anyway. The second pragmatic argument is based on the First Law of Geography:
Near things are more related than far things, which raises the expectation that relevant spatial information is
provided in short cycles. The parameter for the maximum path length, Maximum Query Depth (MQD), has been
tested in order to observe when the overall computation time becomes unacceptable. This test was done by adding
all the 731 triplets into an empty graph database and recording the overall computation time of reasoning for each
triplet, over a range of MQD.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5 Observed Results</title>
      <p>For Part 1, all 731 triplets were added from the descriptions, and no inconsistent triplet occurred. All triplets
were then verified, and P1=1. For Part 2, 60 triplets were tested. 60 out of 60 were processed correctly—both all
consistent and all inconsistent cases were identified—by the graph database, thus P2=1.</p>
      <p>Figure 6a shows the overall number of EP computed in Part 1 for every triplet from the set of 325 in the
considered relation categories. Figures 6b, 6c, and 6d show the number of EP for triplets for each respective
category (MQD = 3).</p>
      <p>Number of EP computed for the 325
triplets in Experiment 1</p>
      <p>Number of EP computed for 146
cardinal direction triples
1
11
21
51
61
71
81
1
Number of EP
20
(c)</p>
      <p>Number of EP
20
Number of EP
6
]15
10
5
0
]4
2
0
(b)
(d)
1
3
5
7
9 11 13 15 17 19</p>
      <p>Triplets</p>
      <p>Computation time for MQD that equals to 1, 2, 3 and 4 respectively is shown in Figure 8. When MQD is set to 1,
2 and 3, the computation time is rather stable (around 0.1s). But when it is set to 4, the computation time suddenly
begins to soar as the size of the graph database grows.</p>
      <p>Computation time when MQD = 1</p>
      <p>Computation time when MQD = 2
Computation time (s)
5.00</p>
      <p>Computation time (s)
5.00
(a)
(c)
Computation time when MQD = 3</p>
      <p>]
Computation time (s)
5.00
325 Triplets</p>
      <p>Compu]tation time when MQD = 4
Computation time (s)
5.00
325 Triplets</p>
      <p>325 Triplets</p>
      <p>The implementation of relational consistency rules is the first step of automatically reason with qualitative
spatial relationships from NL descriptions in a graph database. The implemented mechanisms are flexible and
robust to preserve relational consistency in a graph database.</p>
      <p>In Part 1 of the experiment, the 731 triplets extracted from the 42 place descriptions are relationally consistent.
This result is not surprising, since the descriptions are from students that are already, to various extents, familiar
with the environment of the University of Melbourne’s Parkville campus, therefore the possibility of giving
misleading descriptions is low (but still possible, such as by mistake, and which makes the consistency checking
mechanisms necessary). Alternatively, also malicious users could try to add inconsistent knowledge and should be
prevented. However, the system does only flag an inconsistency; it has no mechanisms to decide whether the
already stored or the added relations are the truer representation of geographic reality.</p>
      <p>According to the result given by Part 2, the system is capable of distinguishing consistent and inconsistent
triplets. Additionally, as shown in Figure 6, the numbers of EP found for qualitative distance relationships are
overall small. This indicates that there are not as many neighbouring relationships that belong to the qualitative
distance relationship category, therefore it is not as rich-connected as cardinal direction and topological
relationships.</p>
      <p>The system is flexible and accommodates certain degrees of ambiguity and uncertainty. The graph database is
robust for maintaining relational consistency with given rules and formalized triplets, even though the reasoning
algorithms are flexible.</p>
      <p>Among the input spatial objects, ‘Campus’ is a special one. It is rather a container of most other spatial objects in
these (campus) place descriptions. Among all 731 triplets, 144 of them (approximately 19.7%) related to ‘Campus’.</p>
      <p>Although relative direction relationships were not reasoned, it was observed that some relative direction
relationships appear ‘inconsistent’ in expression when considered without their individual spatial reference frame.
For instance, in one triplet, the Engineering Department is “right of” the South Lawn, while in another triplet, the
relationship between them is “left of”. Triplets of relative directions occupy approximately 25% of the total number
of triplets; hence they must be addressed in future work by ways of capturing and maintaining their spatial reference
frame.</p>
      <p>Additionally, each relationship is only checked for consistency within its own category. Relational consistency
checking among different categories is not considered in this research; therefore the system is not yet able to reason
relationships from multiple categories. For example, “A-inside-&gt;B” and “A-far-&gt;B” are contradicting since A and
B must be disjoint in order to be far from each other. Due to the fact that ‘inside’ and ‘far’ do not belong to the
same category, they will not be regarded as relationally-inconsistent by the implemented database. Thus, reasoning
rules among different categories of relationship should be developed in future research.</p>
      <p>It was anticipated that by setting different MQD, the number of EP queried for any triplet L-r-&gt;R would be
different. Also, it is expected that the reasoning results would be different since cycles longer than MQD can still be
inconsistent with a triplet to be added. When implemented, no difference in reasoning result was detected by setting
different MQD; however, the difference of number of EP detected is significant.</p>
      <p>Although more EP could be queried by setting larger MQD (and consequently more EK can be used for
consistency checking), it is suggested to set MQD to 3 in order to limit the computation time. As shown in Figure 8,
it can be predicted that with a larger dataset, the computation time would soon become unacceptable with larger
MQD.</p>
    </sec>
    <sec id="sec-5">
      <title>7 Conclusions and future work</title>
      <p>This research proves that a graph database can preserve relational consistency when modelling qualitative place
information derived from NL. The hypothesis is verified by the outcomes of the experiments described in earlier
section. The implemented system is overall flexible enough to accommodate NL descriptions and robust for
maintaining relational consistency.</p>
      <p>Data triplets in this research include spatial relationships from categories such as cardinal directions, qualitative
distances, topological relations, relative directions and other (non-categorized) relationships. Reasoning rules were
developed for the first three categories. When a new input triplet violates a consistency rule, it will be flagged by
the graph database to prevent logical contradiction and relational inconsistency. Currently, the system can only
process reasoning based on relationships that belong to the same category. It is not yet able to reason on triplets
with relationships from multiple categories.</p>
      <p>The path length of reasoning cycles has to be limited for computational reasons. Different MQD were tested for
composition reasoning, and an MQD of 3 still delivered acceptable computation times.</p>
      <p>This research is the first step in attempting to build a relationally consistent database for place information from
NL. Such a graph database, built and maintained in relational consistency, can then be used to solve relevant
decision making tasks, such as landmark navigation; or be used for other applications, such as plausible sketch map
drawing.</p>
      <p>The major limitations of this research are the limited size and context of the test dataset (all campus descriptions
of the same campus). More interesting observations are expected if the graph database is used for testing datasets
referring to different locations. Second, the robustness of mapping NL descriptions of qualitative distance
relationships into intervals needs further research. It is known that qualitative distance judgements change with the
context in a conversation, do not follow the commutative law (from “A is near B” does not necessarily follow that,
within the same context, “B is near A”), and negation within the three-step model is not addressed. For instance,
“not far” could mean either ‘near’ or ‘middle’ in a description, however it is mapped to ‘middle’ in this research.
Third, as discussed, the system is not yet able to reason over relationships from different categories, and also it is
not able to reason with relative direction relationships.</p>
      <p>Apart from the limitations discussed above, other work can also be done in future studies. First, semantic
reasoning could be introduced to automatically identify synonyms of relationship labels, thus helping a graph
database further to maintain relational consistency over a larger variety of relationship names. Secondly, due to the
ambiguity of natural language descriptions, relationships cannot be categorized automatically currently. For
instance, ‘in’ and ‘on’ in NL descriptions could stand for not only topological ‘inside’ (i.e. room in the building;
clock-tower on the lawn), but also other relations (i.e. station on the road). Mechanisms could be developed by
considering the type of the referenced objects as well as the context, in order to categorize relationships
automatically.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Basiri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Amirian</surname>
          </string-name>
          and
          <string-name>
            <given-names>A</given-names>
            .
            <surname>Winstanley</surname>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Use of Graph Databases in Tourist Navigation Application</article-title>
          .
          <source>Computational Science and Its Applications-ICCSA</source>
          <year>2014</year>
          , Springer 8583:
          <fpage>663</fpage>
          -
          <lpage>677</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Belouaer</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Brosset</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Claramunt</surname>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>Modeling spatial knowledge from verbal descriptions</article-title>
          .
          <source>Spatial Information Theory, Springer</source>
          <volume>8116</volume>
          :
          <fpage>338</fpage>
          -
          <lpage>357</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Biggs</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>E. K.</given-names>
            <surname>Lloyd and R. J. Wilson</surname>
          </string-name>
          (
          <year>1986</year>
          ).
          <source>Graph Theory</source>
          ,
          <fpage>1736</fpage>
          -
          <lpage>1936</lpage>
          , Clarendon Press.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Cohn</surname>
            ,
            <given-names>A. G. and S. M.</given-names>
          </string-name>
          <string-name>
            <surname>Hazarika</surname>
          </string-name>
          (
          <year>2001</year>
          ).
          <article-title>"Qualitative spatial representation and reasoning: An overview"</article-title>
          .
          <source>Fundamenta informaticae 46</source>
          (
          <issue>1-2</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Dylla</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Frommberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. O.</given-names>
            <surname>Wallgrün</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Wolter</surname>
          </string-name>
          (
          <year>2006</year>
          ).
          <article-title>SparQ: A toolbox for qualitative spatial representation and reasoning</article-title>
          .
          <source>Qualitative Constraint Calculi: Application and Integration</source>
          , Workshop at KI.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Egenhofer</surname>
            ,
            <given-names>M. J.</given-names>
          </string-name>
          (
          <year>1991</year>
          ).
          <article-title>Reasoning about binary topological relations</article-title>
          .
          <source>Advances in Spatial Databases, Springer</source>
          <volume>525</volume>
          :
          <fpage>141</fpage>
          -
          <lpage>160</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Egenhofer</surname>
            ,
            <given-names>M. J.</given-names>
          </string-name>
          and R. D.
          <string-name>
            <surname>Franzosa</surname>
          </string-name>
          (
          <year>1991</year>
          ).
          <article-title>"Point-set topological spatial relations"</article-title>
          .
          <source>International Journal of Geographical Information System</source>
          <volume>5</volume>
          (
          <issue>2</issue>
          ):
          <fpage>161</fpage>
          -
          <lpage>174</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Egenhofer</surname>
            ,
            <given-names>M. J.</given-names>
          </string-name>
          and J.
          <string-name>
            <surname>Herring</surname>
          </string-name>
          (
          <year>1991</year>
          ).
          <article-title>Categorizing binary topological relations between regions, lines, and points in geographic databases</article-title>
          .
          <volume>9</volume>
          :
          <fpage>94</fpage>
          -
          <lpage>91</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Frank</surname>
            ,
            <given-names>A. U.</given-names>
          </string-name>
          (
          <year>1991</year>
          ).
          <article-title>Qualitative spatial reasoning with cardinal directions</article-title>
          .
          <source>Österreichische Artificial-Intelligence-Tagung/Seventh Austrian Conference on Artificial Intelligence, Springer</source>
          <volume>287</volume>
          :
          <fpage>157</fpage>
          -
          <lpage>167</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Frank</surname>
            ,
            <given-names>A. U.</given-names>
          </string-name>
          (
          <year>1992</year>
          ).
          <article-title>"Qualitative spatial reasoning about distances and directions in geographic space</article-title>
          .
          <source>" Journal of Visual Languages &amp; Computing</source>
          <volume>3</volume>
          (
          <issue>4</issue>
          ):
          <fpage>343</fpage>
          -
          <lpage>371</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Freksa</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          (
          <year>1992</year>
          ).
          <article-title>Using orientation information for qualitative spatial reasoning</article-title>
          ,
          <source>Spatio-Temporal Reasoning</source>
          , Springer 639:
          <fpage>162</fpage>
          -
          <lpage>178</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Güting</surname>
            ,
            <given-names>R. H.</given-names>
          </string-name>
          (
          <year>1994</year>
          ).
          <article-title>GraphDB: Modeling and Querying Graphs in Databases</article-title>
          .
          <source>In Proceedings of the 20th International Conference on Very Large Data Bases (VLDB)</source>
          , Morgan Kaufmann:
          <fpage>297</fpage>
          -
          <lpage>308</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Kordjamshidi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , P. Frasconi,
          <string-name>
            <surname>M. Van Otterlo</surname>
            ,
            <given-names>M.-F.</given-names>
          </string-name>
          <string-name>
            <surname>Moens and L. De Raedt</surname>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Relational learning for spatial relation extraction from natural language</article-title>
          .
          <source>Inductive Logic Programming</source>
          ,
          <source>Springer</source>
          <volume>7207</volume>
          :
          <fpage>204</fpage>
          -
          <lpage>220</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Mackaness</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Bartie</surname>
          </string-name>
          and
          <string-name>
            <surname>C. S.-R. Espeso</surname>
          </string-name>
          (
          <year>2014</year>
          ).
          <source>Understanding Information Requirements in “Text Only” Pedestrian Wayfinding Systems. Geographic Information Science, Springer</source>
          <volume>8728</volume>
          :
          <fpage>235</fpage>
          -
          <lpage>252</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>May</surname>
            ,
            <given-names>A. J.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ross</surname>
          </string-name>
          and
          <string-name>
            <given-names>S. H.</given-names>
            <surname>Bayer</surname>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>"Incorporating landmarks in driver navigation system design: An overview of results from the REGIONAL project</article-title>
          .
          <source>" Journal of Navigation</source>
          <volume>58</volume>
          (
          <issue>1</issue>
          ):
          <fpage>47</fpage>
          -
          <lpage>65</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Moratz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Nebel</surname>
          </string-name>
          and C.
          <string-name>
            <surname>Freksa</surname>
          </string-name>
          (
          <year>2003</year>
          ).
          <article-title>Qualitative spatial reasoning about relative position</article-title>
          .
          <source>Spatial cognition III, Springer</source>
          <volume>2685</volume>
          :
          <fpage>385</fpage>
          -
          <lpage>400</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>D. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cui</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Cohn</surname>
            ,
            <given-names>A. G.</given-names>
          </string-name>
          (
          <year>1992</year>
          ).
          <source>A Spatial Logic based on Regions and Connection. 3rd Int. Conf. on Knowledge Representation and Reasoning</source>
          , Morgan Kaufmann:
          <fpage>165</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <surname>Sproat</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>R. E.</given-names>
            <surname>Coyne</surname>
          </string-name>
          and
          <string-name>
            <given-names>J. B.</given-names>
            <surname>Hirschberg</surname>
          </string-name>
          (
          <year>2010</year>
          ).
          <article-title>Spatial Relations in Text-to-</article-title>
          <string-name>
            <surname>Scene</surname>
            <given-names>Conversion</given-names>
          </string-name>
          ,
          <source>Computational Models of Spatial Language Interpretation Workshop at Spatial Cognition</source>
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <surname>Tiwari</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <source>Professional NoSQL</source>
          , John Wiley &amp; Sons.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Vasardani</surname>
            , M.,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Timpf</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Winter and M. Tomko</surname>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>From descriptions to depictions: A conceptual framework</article-title>
          .
          <source>Spatial information theory, Springer</source>
          <volume>8116</volume>
          :
          <fpage>299</fpage>
          -
          <lpage>319</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <string-name>
            <surname>Wallgrün</surname>
            ,
            <given-names>J. O.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Frommberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dylla</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Freksa</surname>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>Qualitative spatial representation and reasoning in the SparQ-toolbox</article-title>
          .
          <source>Spatial Cognition V Reasoning</source>
          , Action, Interaction, Springer 4387:
          <fpage>39</fpage>
          -
          <lpage>58</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Wiebrock</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Wittenburg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Schmid</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Wysotzki</surname>
          </string-name>
          (
          <year>2000</year>
          ).
          <article-title>Inference and visualization of spatial relations</article-title>
          . Spatial
          <string-name>
            <surname>Cognition</surname>
            <given-names>II</given-names>
          </string-name>
          ,
          <year>Springer 1849</year>
          :
          <fpage>212</fpage>
          -
          <lpage>224</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Freksa</surname>
          </string-name>
          (
          <year>1996</year>
          ).
          <article-title>"Qualitative spatial reasoning using orientation, distance, and path knowledge</article-title>
          .
          <source>" Applied Intelligence</source>
          <volume>6</volume>
          (
          <issue>1</issue>
          ):
          <fpage>49</fpage>
          -
          <lpage>58</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>