attached to a specific ontology class and can be
applied to infer data, or modify the current data.
spin:rule property can be used to defined an
inference rule using SPARQL construct or
insert/delete.
Moreover, SPIN, which submitted to w3c to be
discussed, adds rules to ontology level. However,
our approach separates between rules level and
ontology level. Separation between ontology and
rules levels gives the user flexibility to add rules. In
other words, it is difficult for the user to update the
standard shared ontology to add his rules. Moreover,
there are many users may add rules to infer the same
property depending on their own data. The user
wants to extend his data depending on the semantics
of the data and the expected queries to be asked.
Therefore, the users have different data want to
make many rules even for the same ontology.
Attaching rules to dataset gives flexibility to the
users and avoids rules conflicts on ontology level.
As an example that will be used throughout this
paper, consider that we will start a research project in
semantic web, in which a huge amount of data should
be represented into a semantic format. Some
experiments will be done on this data to study the
future of semantic web. It is decided that Tim
Berner-Lee is the general manager for this project.
The smart web agent, which is responsible for
nominating project members, searches the linked
data could to find qualified researchers. The agent
may ask queries such as: Who are interested in
semantic web, who are interested in semantic web
and know Tim Berner-Lee, and so on.
The remainder of this paper is organized as
follows. Section 2 describes the overall system
architecture. Section 3 explains the idea of adding
user-defined rules. Section 4 describes the proposed
wrapper for SPARQL endpoint that exploits the
defined rules. The experiments and results are
discussed in section 5. Finally, section 6 provides
the conclusion of this research.
2 SYSTEM ARCHITECTURE
The proposed wrapper consists of a set of user-
defined rules and a simple inference engine to
expand SPARQL queries based on the defined rules.
Backward chaining is used to expand the queries.
The wrapper sends SPARQL queries after expansion
to the original endpoint. In addition, the wrapper
collects the results of these queries and sends them
back to the client. Figure 1 shows a general
overview of the proposed wrapper.
Figure 1: System overview.
Moreover, the query expansion process starts
with finding appropriate rules in the defined rule set.
Furthermore, rules index is used to facilitate finding
rules during searching process. A matching between
the retrieved rules and the user query produces
expanded queries after replacing query conditions
with rules premises.
3 ADDING RULES
The data publisher may add extra knowledge (rules),
which considered as an extension for the original
data. Moreover, adding this kind of knowledge
enables the data admin, who selects specific
vocabularies to represent the published data into
RDF, to suggest alternatives vocabularies and
expresses them in rules instead of duplicate RDF
data with different vocabularies. In addition, the
SPARQL endpoint admin should add a set of rules
depending on the meaning of RDF dataset and
common queries that users used to ask.
Moreover, there are two types of rules that can
be added to the proposed wrapper. The first type
focuses on discovering new RDF triples to get the
implicit data, for example, the rules that infers the
relation between topics and authors. This rules
defined as: if a person X is an author for the paper Y
and the topic of the paper Y is T then the person X is
interested in the topic T. The other type of rules
focuses on vocabularies mapping to allow client to
use some different equivalent vocabularies. This will
not restrict the user to use the same vocabulary as
RDF dataset.
The format of user-defined rule is a simple
production rule, “condition Æ action”. The
condition part syntax is the same as SPARQL query
condition syntax. The action part is also represented
into SPARQL syntax. Figure 2 shows an example
for the rule: If a person A is an author to a paper Y,
and a person B is an author to the paper Y, then Æ A
knows B. The first part of the rule format is xml
namespaces for the used vocabularies. The second
part is the condition of the rule. The last part is the
action part.
WEBIST2012-8thInternationalConferenceonWebInformationSystemsandTechnologies
730