<!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>Towards a grammar formalism for retrieving information on the Semantic Web</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Eunhye Shin</string-name>
          <email>dc20005245@korea.ac.kr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sujin Yoo Seongbin Park</string-name>
          <email>mynameislydia@korea.ac.kr hyperspace@korea.ac.kr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Korea university</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Korea university Korea university</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we report our ongoing research on a grammar formalism for retrieving information on the Semantic Web. We view the Semantic Web as a collection of databases and use a two-level grammar by which one can specify contextsensitive constraints that need to be satisfied. To retrieve information, a user can simply specify keywords and our system can show a result that is a string derived using the two-level grammar.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In this paper, we propose an approach to write
contextsensitive constraints using a grammar in order to retrieve
information on the Semantic Web. To this end, we use a
two-level grammar that is a 6-tuple (M, V, T, RM , RV , S),
where M is a finite set of metanotions, V is a finite set
of syntactic variables such that M ∩ V = ∅, T is a finite
subset of V +, RM is a finite set of metarules X → Y , where
X ∈ M , Y ∈ (M ∪ V )∗ or Y is a regular expression, and
for all W ∈ M , (M, V, RM , W ) is a collection of
contextfree grammar and regular expression rules, RV is a finite
set of hyperrules of the form H0 → H1, H2, · · · , Hm, where
m ≥ 1 and H0 ∈ (M ∪ V )+, Hi ∈ (M ∪ V )∗ for i ≥ 1, Hi
is a hypernotion, and S is a string of positive length over
M ∪ V , respectively [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
∗Corresponding author
      </p>
      <p>The motivation of using a two-level grammar is that it
allows to specify context-sensitive information in an intuitive
way. Our approach allows a user to express facts that
contain certain parameters which reflect structures of databases
that constitute the Semantic Web. In other words, the
formalism allows users to specify certain facts together with
placeholders that can be instantiated using the data stored
in databases.</p>
      <p>The structure of this paper is as follows. Section 2 describes
related research works. Section 3 explains the idea behind
our approach using illustartive examples. Section 4 describes
the structure of the system that we implemented. Section 5
concludes the paper and discusses research directions.</p>
    </sec>
    <sec id="sec-2">
      <title>2. RELATED WORKS</title>
      <p>
        There are two research areas that are related to our
research. One is research about two-level grammar and the
other is retrieving information on the Semantic Web. Two
level grammar was introduced to define the syntax of
ALGOL 68 by van Wijngaarden [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. There are two types of
rules in a two-level grammar. One is a metarule and the
other is a hyperrule. A metarule is a context-free
production rule and it can provide possible values for a metanotion
in a hyperrule. A hyperrule can describe context-sensitive
conditions and this is a machanism by which we can model
constraints in a database or between databases. A two-level
grammar has been used in specifying the syntax of a natural
language which reflects grammatical constraints [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. It has
been also applied to define a programming language [
        <xref ref-type="bibr" rid="ref2 ref5">2, 5</xref>
        ].
One way to retrieve information on the Semantic Web is to
use a query language, but traditional database query
languages are not appropriate and users need a semantic query
language such as SPARQL [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ]. In the mean time, for end
users, a system such as SPARK [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] that can convert keyword
queries into SPARQL queries can be helpful.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. ILLUSTRATIVE EXAMPLES</title>
      <p>In this section, we show how we can describe context-sensitive
information using a two-level grammar. A string that can
be derived using the grammar corresponds to certain
information that can result from combining data that exist in the
databases. There are two types of examples. The first
example shows the case where we use one database that contains
some number of tables. The second example shows how we
can use two databases.
Given this database, we can write metarules and hyperrules
so that a string whose structure looks ’( ), ( ) travels ( ) with
( ) package in ( ) agency.’ can be derived as follows, where
( ) is a placeholder that can be instantiated with the data
stored in the database tables.</p>
      <sec id="sec-3-1">
        <title>The metarule is as follows.</title>
        <p>I : : DATE, U ID
U : : U ID U NAME t r a v e l s S ID
S : : S ID S NAME with P ID
P : : P ID P NAME package i n A ID
A : : A ID A NAME agency .</p>
      </sec>
      <sec id="sec-3-2">
        <title>The hyperrule is as follows.</title>
      </sec>
      <sec id="sec-3-3">
        <title>START : I U S P A</title>
        <p>where U ID i s U ID : t r u e
where S ID i s S ID : t r u e
where P ID i s P ID : t r u e
where A ID i s A ID : t r u e
Assuming that the tables contain data shown in table 1 to
table 5, a possible derivation looks as follows.</p>
        <p>ST ART ⇒ I U S P A ⇒ DAT E, U ID U S P A
⇒ 2012 − 7 − 2, 1001 U S P A
⇒ 2012 − 7 − 2, 1001 U ID U NAME travels S ID S P A</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3.2 Example 2</title>
      <p>In order to show how the same approach can be used with
multiple databases, we added a university database that
consists of two tables. In addition, we modified the travel
database. Customers in the travel database are students in
the university database. Buy table contains the information
about package purchasing for each customer and user name
of travel database corresponds to student name of university
database (figure 3).
U NAME o f TRAVEL.NAME and U NAME o f USER
: t r u e
(3) The following hyperrules verify whether data is
connected correctly in Univ DB.</p>
      <p>D ID o f UNI .NAME i s same D ID o f DEPART i s
same , D ID o f UNI .NAME and D ID o f DEPART
: t r u e
(4) The following hyperrules verify whether data is
connected correctly in Travel DB.</p>
      <p>P ID o f TRAVEL.NAME i s same P ID o f PACKAGE,
P ID o f BUY i s same P ID o f PACKAGE, P ID o f
TRAVEL.NAME, P ID o f PACKAGE and P ID o f BUY
: t r u e
(5) The following hyperrule verifies whether purchasing data
is connected correctly in Travel DB.
where U ID i s U ID : t r u e</p>
    </sec>
    <sec id="sec-5">
      <title>4. TLG SYSTEM</title>
      <p>
        Our system (TLG sysetm) has been implemented using Java
and HSQLDB system [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The operation starts by taking a
keyword from a user. The Searching scale setting module
assigns a column according to the keyword. The Result
creating module matches the keyword against data in the
assigned column. Finally, the Result printing module shows
the result from result creating module as a string. Figure
5 shows the structure of the TLG system, where numbers
inside small circles correspond to steps involved in sequence.
      </p>
    </sec>
    <sec id="sec-6">
      <title>5. CONCLUSIONS</title>
      <p>D_id
100
102
In this paper, we report our ongoing research on how a
twolevel grammar can be used to retrieve information on the
Semantic Web. We view the Semantic Web as a collection
of databases and constraints existing in the colecction can
be specified using hyperrules of the formalism that we
proposed.</p>
      <p>
        The motivation of the current research is that once we have
a declarative description about the Semantic Web using a
formal grammar, it becomes possible to process the Semantic
Web. In other words, a part of the Semantic Web can be fed
into a computer program as an input and the program can
parse the input and perform some task. This is in line with
the goal of utilizing the Semantic Web as a representation
medium for computations [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>Currently, we are implementing a system that parses
expressions defined using a two-level grammar and shows
derivation results. We are also working on ways by which the
information on the Semantic Web can be exploited using a</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.C.</given-names>
            <surname>Marshall</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.M.</given-names>
            <surname>Shipman</surname>
          </string-name>
          .
          <article-title>Which Semantic Web?</article-title>
          .
          <source>In Proceedings of the 14th ACM Conference on hypertext and hypermedia</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>B.</given-names>
            <surname>Edupuganty</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.R.</given-names>
            <surname>Bryant</surname>
          </string-name>
          .
          <article-title>Two-level Grammar as a Functional Programming Language. In The computer journal</article-title>
          , vol
          <volume>32</volume>
          , no 1,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>A.van Wijngaarden</surname>
          </string-name>
          .
          <source>Report on the Algorithmic language ALGOL 68. Numer</source>
          <volume>14</volume>
          :
          <fpage>79</fpage>
          -
          <lpage>218</lpage>
          ,
          <year>1969</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>B.R.</given-names>
            <surname>Bryant</surname>
          </string-name>
          ,
          <string-name>
            <surname>D</surname>
          </string-name>
          , Johnson, and
          <string-name>
            <given-names>B.</given-names>
            <surname>Edupuganty</surname>
          </string-name>
          .
          <article-title>Formal specification of natural language syntax using two-level grammar</article-title>
          .
          <source>In Proceedings of the 11th International Conference on Computational Lnguistics</source>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Maluszynski</surname>
          </string-name>
          .
          <article-title>Towards a Programming Language Based on the Notion of Two-Level Grammar In Theoretical Computer Science</article-title>
          ,
          <volume>13</volume>
          -
          <fpage>43</fpage>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Fikes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hayes</surname>
          </string-name>
          ,
          <string-name>
            <surname>and I. Horrocks.</surname>
          </string-name>
          <article-title>OWL-QL-a language for deductive query answering on the Semantic Web</article-title>
          <source>In Journal of Web Semantics: Science, Services and Agents on the World Wide Web</source>
          . vol
          <volume>2</volume>
          , issue 1,
          <fpage>19</fpage>
          -
          <lpage>29</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Arenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.P.</given-names>
            <surname>Miranker</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          <article-title>P´erez, and</article-title>
          <string-name>
            <given-names>J.F.</given-names>
            <surname>Sequeda</surname>
          </string-name>
          .
          <article-title>Querying Semantic Data on the Web</article-title>
          .
          <source>In SIGMOD Record</source>
          , vol.
          <volume>41</volume>
          , no.
          <issue>4</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Xiong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y .</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>SPARK: adapting keyword query to semantic search</article-title>
          <source>In Proceedings og the 6th International Semantic Web Conference and 2nd Asian Semantic Web Conference</source>
          ,
          <volume>694</volume>
          -
          <fpage>707</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>[9] HSQLDB www</article-title>
          .hsqldb.org
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.A.</given-names>
            <surname>Rodriguez</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Bollen</surname>
          </string-name>
          .
          <article-title>Modelling Computations in a Semantic Network</article-title>
          . http://arxiv.org/abs/0706.0022,
          <year>2007</year>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <surname>S</surname>
          </string-name>
          , Yoo, and
          <string-name>
            <given-names>S.</given-names>
            <surname>Park</surname>
          </string-name>
          .
          <article-title>A Semantic Web browser for novice users</article-title>
          .
          <source>In Proceedings of the 6th International Conference on Complex, Intelligent, and Software Intensitve Systems</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>E.</given-names>
            <surname>Shin</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Park</surname>
          </string-name>
          .
          <article-title>Two level grammar and the Semantic Web</article-title>
          .
          <source>In Proceedings of the International Conference on Applied and Theoretical Information Systems Research</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Heath</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Berners-Lee</surname>
          </string-name>
          .
          <article-title>Linked Data - The Story So Far</article-title>
          .
          <source>In International Jounral on Semantic Web and Information Systems</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>