After Language, provides a rich infrastructure for representing

After tokenization phase
semantic mapping will take place. Semantic mapping deals with data retrieval
from ontologies. 



We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now

ontology defines a common vocabulary for researchers who need to share
information in a domain. It includes machine-interpretable definitions of basic
concepts in the domain and relations among them.



Ontologies are nothing but
directed, labelled graph data format. We are focusing on the evaluation
of querying languages designed for Semantic Web related knowledge
representation rather than using traditional database and general-purpose query
languages like SQL, F-logic. RDF-enabled search technologies have the potential
to provide a significant improvement over the current keyword-based engines
especially when it comes to conceptual browsing and querying.

Also we should take care whether the query language can
exploit the presence of ontology (schema) knowledge, i.e., if the
ancestor/descendant traversal of class/property hierarchies can be performed
and what filtering conditions can be posted on class/property hierarchies. The
basic criterion of the Data Querying is the ability of the query language to
provide constructs for calculating the extent of a property/class, i.e., the
ability to find all the resources defined as instances of a particular
property/class. Furthermore, in this category fall criteria such as the support
of complete Boolean filters (negation, conjunction, disjunction), set-based
operations (union, intersection, difference), arithmetic operations on data
values etc.

RDF Schema Language, provides a rich infrastructure for
representing meaningful information in the form of ontologies.



This specification defines the syntax
and semantics of the SPARQL query language. SPARQL can be used to express
queries across diverse data sources, whether the data is stored natively as RDF
or viewed as RDF via middleware. SPARQL contains capabilities for querying
required and optional graph patterns along with their conjunctions and disjunctions.

SPARQL also supports extensible value testing and constraining queries by
source RDF graph. The results of SPARQL queries can be results sets or RDF


Jena framework for Java

Jena is a collection of
RDF tools written in Java that includes Java model/graph API, an RDF Parser
(supporting an N-Triples filter), a query system based on RDQL, support classes
for DAML+OIL ontologies and persistent/in-memory storage or various other
storage implementations. Due to its storage abstraction, Jena enables new
storage subsystems to be integrated. To facilitate querying, Jena provides
statement centric methods for manipulating an RDF model as a set of RDF triples
and resource-centric methods for manipulating an RDF model as a set of
resources with properties, as well as built-in support for RDF containers


We are going to perform
semantic mapping by making use of Wordnet ontologies for finding synsets of the
word and then retrieving related data from the ontologies that we built

Aache Jena provides the
framework by means of which we fire SPARQL queries on given dataset and
retrieved data is stored in resource objects  




It is the technique by which the data
from the document is mapped against its tag and RDF is updated. For example the
following Figure 4 shows the information related to a random length () method.



To find length of string

int length();







Now let us consider that we are
interested in finding the description related to the length () method. We can
query the ontology by entering keywords into the query.


static void sparqlTest()


      OntModel m = ModelFactory.createOntologyModel(
OntModelSpec.OWL_MEM,                                    null);

      FileManager.get().readModel( m,
“c:/Users/USER/Desktop/ph1.owl” );

queryString = “prefix rdfs:
” +

owl: ” +

            “SELECT  ?subject ?predicate ?object ” +

{ ” +”  ?subject rdfs:comment
?object ” + “.FILTER regex(str(?subject),             “length”)             +”}
” +



query = QueryFactory.create(queryString);

       QueryExecution qexec =
QueryExecutionFactory.create(query, m);


results = qexec.execSelect();



                                    QuerySolution soln = results.nextSolution();

                                    RDFNode R = soln.get(“predicate”);

                                    System.out.println(“Subject :” + R





Subject: To find length of string

BUILD SUCCESSFUL (total time: 1 second)


Ontology plays the vital role while
extracting and keeping the information relevant and update. Thus the searching
time for required information is minimal when information is stored in four
different RDF files compared to other two models. The model also reduces the
human effort required in seeking the relevant information.