\chapter{The Semantic Web}
\label{c:TSW}
%PANORAMICA SUL SEMANTIC WEB

\par In this chapter we will present the new scenario introduced
by a new vision of the web: \mbox{\textbf{the Semantic Web}}. A
fundamental paper about the Semantic Web is the one written by
\mbox{J. Hendler}, O. Lassila and T. Berners-Lee that appeared on
\mbox{Scientific America} in 2001 \cite{Semantic2001}. The authors
depicted a new ``world'' where people interoperate with their
electronic devices in a completely different way from today. They
imagine that, for instances, you could be at the doctor's office
and you have to book a series of therapy sessions but you already
have some appointments. You can instruct your Semantic Web agent
through your handheld Web browser. You can set up the search to
find only places within a 20-km radius of your home and only in a
specific time of the day. The agent, then, starts to look for
information interacting with other agents present on the web sites
of the doctors in the area. In few minutes the agent presents you
with a plan; if you like it you can change your week agenda and
mail your tennis trainer that for a month you can not play. If you
don't like the plan you can set up your agent with stricter
preferences and redo the search.

\par At present the World Wide Web cannot carry out all the tasks
of the above scenario. Most of the Web's content today is designed
for humans interaction, not for computer programs. Computers can
easily parse Web pages for layout and routine processing -- a
header, a link to another page -- but in general they have no
reliable way to process the semantics: this is the home page of my
professor and this link goes to the course material page.

This is the reason for which the research area of Semantic Web is
active both at the the European (IST program supports several
projects, On-To-Knowledge, SEWASIE, etc.)  and American level as
it is shown in the following subsections.

\section{What is the Semantic Web?}
\label{sec:SW}
%DESCRIZIONE WEB SEMANTICO
\par Nowadays the Web is a huge collection of information useful
for people but meaningless for machines without a post-processing.
By now the WWW reaches its second version; the first saw the HTML
static pages changing the style people share information, while
the second is the one we are experiencing today with dynamic pages
created as response to a query on a database. The increasing of
available information and of the usage of the Web, are creating
new expectations with the users. In other words it's time to think
about the third version of the WWW: \emph{\textbf{the Semantic Web}}.\\
\emph{\textbf{The Semantic Web}} will bring structure to the
meaningful content of Web pages, creating an environment where
software agents, roaming from page to page, can readily carry out
sophisticated tasks for users. \\
Such an agent coming to the professor's Web page will not just
know that the page has some keywords such as ``ontology, knowledge
representation, artificial intelligence'' (as might be encoded
today) but also that the course is scheduled for Tuesday and
Thursday at 11.00 am. These semantics were encoded into the Web
pages using off-the-shelf software for writing Semantic Web pages.\\
\emph{The Semantic Web} is not a separate Web but an extension of
the current one, in which information is given well-defined
meaning, better enabling computers and people to work in
cooperation. The first steps in weaving the Semantic Web into the
structure of the existing Web are already under way. In the near
future, these developments will introduce new functionality as
machines become much better able to process and ``understand'' the
data that they merely display at present.\\
The essential property of the World Wide Web is its universality.
The power of a hypertext link is that ``anything can link to
anything''. Web technology, therefore, does not discriminate
between commercial and academic information, or among cultures,
languages, media and so on. Information varies along many axes.
One of these is the difference between information produced
primarily for human consumption and that produced mainly for
machines. At one end we have everything from the TV commercial to
poetry. At the other end we have databases, programs and sensor
output. Today, the Web has developed most rapidly as a means of
documents for people rather than for data and information that can
be processed automatically. The Semantic Web aims to build these
capabilities. Like the Internet, the Semantic Web will be as
decentralized as possible. Such Web-like systems generate a lot of
excitement at every level, from major corporation to individual
user, and provide benefits that are hard or impossible to predict
in advance.

\section{Knowledge representation}
%Rappresentazione della conoscenza
\label{sec1:KR} For the semantic web to function, computers have
to be able to access structured collections of information and
sets of inference rules that they can use to conduct automated
reasoning. Artificial-intelligence and DataBase researchers have
studied such systems since long before the Web was developed.
Knowledge representation is currently in a state comparable to
that of hypertext before the advent of the Web. Many studies has
been conducted in this area but till now there are only some
demonstrations of the numerous potential.
\\Traditional knowledge-representation systems typically have been
centralized, requiring everyone to share exactly the same
definition of common concepts. But central control is increasing
the size and scope of such a system and rapidly it becomes
unmanageable.
\\Semantic Web researchers make the language for the rules as
expressive as needed to allow the Web to reason as widely as
desired. The challenge of the Semantic Web, therefore, is to
provide a language that expresses both data and rules for
reasoning about the data and that allows rules from any existing
knowledge-representation system to be exported onto the Web.
\\Adding logic to the Web -- that means to use rules to make
inferences, to choose courses of action and to answer question --
is a fundamental task within the Semantic Web community at the
moment. Two important technologies for developing the Semantic Web
are already in place: \textbf{eXtensible Markup Language}
(\textbf{XML}) and the \textbf{Resource Description Framework}
(\textbf{RDF}). XML lets everyone create their own tags -- hidden
labels that annotate Web pages or sections of text on a page.
Scripts, or programs, can make use of these tags in sophisticated
ways, but the scripts writer has to know what the page writer uses
each tag for. In other words, XML allows users to add arbitrary
structure to their documents but says nothing about what the
structures mean.
\\Meaning is expressed by RDF, which encodes it in \emph{sets of
triples}, each triple being like subject, verb and object of an
elementary sentence. These triples can be written using XML tags.
In RDF, a document makes assertions that is, particular things
(people, Web pages or whatever) have properties (``is a sister
of'', ``is the author of'') with certain values (another person,
another Web page). This structure turns out to be a natural way to
describe the vast majority of the data processed by machines.
Subject and object are each identified by a Universal Resource
Identifier (URI), just as used in a link on a Web page. The verbs
are also identified by URIs, which enables anyone to define new
concept, a new verb, just by defining a URI for it somewhere on
the Web.

\section{Ontologies}
%Ontologie
\label{sec1:Ontologie} In such a system, where information is
distributed in different Web sites or databases, a program that
wants to compare or combine information across two databases has
to solve the problem of information integration. For example the
word ``staff'' in a DB may reference to the people which work in a
certain department while another DB may call them ``employee''.
Ideally, the program must have a way to discover such common
meanings for whatever databases it encounters. A solution to this
problem is provided by the key component of the Semantic Web,
collections of information called \mbox{\emph{ontologies}}.
\emph{\textbf{Ontology}} is a term borrowed from philosophy that
refers to the science of describing the kinds of entities in the
world and how they are related (see chapter \ref{c2:cap2} for a
complete overview). The most typical kind of ontology for the Web
has a taxonomy and a set of inference rules. The taxonomy defines
classes of objects and relations among them. For example, an
address may be defined as a type of location, and city codes may
be defined to apply only to locations, and so on. Classes,
subclasses and relations among entities are a very powerful tool
for Web use. We can express a large number of relations among
entities by assigning properties to classes and allowing
subclasses to inherit such properties.
\par Inference rules in ontologies supply further power. An
ontology may express rules on the classes and relations in such a
way that a machine can deduce some conclusions. The computer does
not truly ``understand'' any of this information, but it can now
manipulate the terms much more effectively in ways that are useful
and meaningful to the human user. With ontology pages on the Web,
solutions to terminology (and other) problems begin to emerge. The
meaning of terms or XML codes used on a Web page can be defined by
pointers from the page to an ontology.
\par Ontologies can enhance the functioning of the Web in many
ways. They can be used in a simple fashion to improve the accuracy
of Web searches -- the search program can look for only those
pages that refer to a precise concept instead of all the ones
using ambiguous keywords. More advanced applications will use
ontologies to relate the information on a page to the associated
knowledge structures and inference rules.
\par A more precise and large description of ontologies will be
presented in chapter two.

\section{Agents}
%Agenti
\label{sec1:Agenti} The real power of the Semantic Web will be
realized when people create many programs that collect Web content
from diverse sources, process the information and exchange the
results with other programs. The effectiveness of such software
agents will increase exponentially as more machine-readable Web
content and automated services (including other agents) become
available. In fact, an agent is a software component that enjoys
the following properties \cite{Woold95}:
\begin{itemize}
    \item autonomy: agents encapsulate some state and make decision about
    what to do based on this state, without any human interaction;
    \item reactivity: agents are situated in an environment, they are able to
    perceive the modifications of the environment, and they can respond to those
    modifications;
    \item pro-activeness: agents are able to exhibit goal-directed behavior by
    taking the initiative;
    \item social ability: agents interact with other agents and with other applications.
\end{itemize}

Due to the described features, an agent can automatically navigate
in the Web and move from a site to an other site in order to
accomplish a specific task. If the web where the agent navigates
is a Semantic Web, an agent may have the perception of the
contents stored in the visited sources. In this way, it can change
its behavior on the base of the visited sites, and, for example,
it can follow specific links because they are semantically correct
with respect to the goal of the agent. Therefore, the Semantic Web
allows an agent to have a well-knowledge of the environment where
the agent is instantiate and consequently to react to the
environment without mistakes.

Important contributions to these fundamental components of the
Semantic Web arrive from
\textbf{AgentLink}\footnote{http://www.agentlink.org/}, an
European excellence network funded by the UE IST programme, that
is very active in the study and productions of software agents.



%%% Local Variables:
%%% mode: latex
%%% TeX-master: "tesi"
%%% End:
