Title: Simple HTML Ontology Extensions
1Simple HTML Ontology Extensions
- Ahmet Selman BozkirHacettepe University Computer
Eng. Dept.
2Contents
- Whats SHOE?
- What SHOE Isn't...
- Specifications
- Base Ontology of SHOE
- Creating a Basic Ontology
- Annotating an HTML document with SHOE
- Inferences in SHOE Ontologies
- References
3Whats SHOE?
- HTML was never meant for computer consumption
its function is for displaying data for humans to
read. The "knowledge" on a web page is in a
human-readable language (usually English), laid
out with tables and graphics and frames in ways
that we as humans comprehend visually. - Unfortunately, intelligent agents aren't human.
Even with state-of-the-art natural language
technology, getting a computer to read and
understand web documents is very difficult. This
makes it very difficult to create an intelligent
agent that can wander the web on its own, reading
and comprehending web pages as it goes. - So what can be done?
4Whats SHOE?
- Answer is simply SHOE.
- SHOE eliminates this problem by making it
possible for web pages to include knowledge that
intelligent agents can actually read. - SHOE is a small extension to HTML which allows
web page authors to annotate their web documents
with machine-readable knowledge. SHOE makes real
intelligent agent software on the web possible.
5Whats SHOE?
- SHOE is an HTML-based knowledge representation
language. - SHOE can be used to embed data from a variety of
sources and for a variety of purposes. It is not
intended for any one particular function.
However, SHOE is primarily meant to make it
possible for web robots and intelligent agents to
finally make a dent in making all our lives a
little easier.
6Whats SHOE?
- Developed by Parallel Understanding Systems
Group, - Prof. Jim Hendler
- Department of Computer Science
- University of Maryland at College Park
- To sum up...
- Superset of HTML
- To specify ontologies for Internet-agents
- Annotate web documents semantically with machine
readable knowledge - Compatible to SGML and XML
- But now work at the University of Maryland on web
ontologies continues in the Semantic Web and
Agents Project , which uses the Web Ontology
Languages OWL and DAMLOIL. These languages are
results of standardization efforts that are in
part based on SHOE
7What SHOE Isn't...
- It is not just a meta-content language.It
enables web designers to embed documents not only
with information about the overall "content" of
those documents but any arbitrary information at
all. SHOE also allows agents to make automatic
inferences about the data they learn, provides a
hierarchical categorization scheme, and a
sophisticated ontology mechanism designed
specifically for the web needs - It is purposely not a verbose knowledge-representa
tion system.SHOE attempts to provide as rich
expressivity as possible while keeping in mind
that there's a tremendous amount of data out
there. - It does not have any pre-defined ontologies,
categories, relationships, or inferences.SHOE is
a language in which categories, relationships,
attributes, inferences, etc. can be defined by
ontologies, but SHOE itself does not define them.
8Specifications
- Everything is started with adding this startup
tag into head of your classic HTML document. - ltMETA HTTP-EQUIV"SHOE" CONTENT"VERSION1.0"gt
- You may use this logo that represents your web
page supports SHOE.
9Specifications
- SHOE uses the following additional tags as an
extension to HTMLFor the definition of
ontologiesONTOLOGY, /ONTOLOGY, USE-ONTOLOGY,
DEF-CATEGORY,DEF-RELATION, /DEF-RELATION,
DEF-ARG, DEF-RENAME,DEF-CONSTANT, DEF-TYPE,
DEF-INFERENCE, /DEF-INFERENCE,INF-IF, /INF-IF,
INF-THEN, /INF-THEN, COMPARISON,/COMPARISON,
CATEGORY, RELATION, /RELATION, ARG. - For the annotation of HTML-pages
additionallyINSTANCE, /INSTANCE.
10Creating a Basic Ontology
- ltHTMLgt ltHEADgtlt!--Indication that this document
is conformant with SHOE 1.0-gt ltMETA
HTTP-EQUIV"SHOE" CONTENT"VERSION1.0gt ltTITLEgt
Our CS Ontology lt/TITLEgt lt/HEADgt ltBODYgtlt!--Dec
laration of the ontologys name and
version--gt ltONTOLOGY ID"cs-dept-ontology"
VERSION"1.0gtlt!--Declaration to use another
yet existing ontology--gt ltUSE-ONTOLOGY
ID"base-ontology" VERSION"1.0" PREFIX"base
URL"http//www.cs.umd.edu/projects/plus/SHOE/base
.html"gt - The prefix base is used to indicate explicit
references to elementsof the imported base
ontology.
11Creating a Basic Ontology
- Since our ontology deals with computer science
departments, let's toss the following
categorization facts into the ontology - departments and research groups are
organizations. - faculty, assistants, and administrative staff are
workers. - workers and students are people.
- postdocs, lecturers, and professors are a
faculty. - research assistants and teaching assistants are
assistants. - graduate students and undergraduate students are
students. - secretaries are administrative staff.
- chairs are both professors and administrative
staff. - organizations, publications, and people are
"basic items". The fact that chairs can be both
professors and administrative staff indicates
that SHOE provides multiple inheritance
categories can have more than one supercategory.
We declare all these things by saying
12Creating a Basic Ontology
- lt!-- Here we lay out our category hierarchy --gt
ltDEF-CATEGORY NAME"Organization"
ISA"base.SHOEEntity"gt ltDEF-CATEGORY
NAME"Person" ISA"base.SHOEEntity"gt
ltDEF-CATEGORY NAME"Publication"
ISA"base.SHOEEntity"gt ltDEF-CATEGORY
NAME"ResearchGroup" ISA"Organization"gt
ltDEF-CATEGORY NAME"Department"
ISA"Organization"gt ltDEF-CATEGORY NAME"Worker"
ISA"Person"gt ltDEF-CATEGORY NAME"Faculty"
ISA"Worker"gt ltDEF-CATEGORY NAME"Assistant"
ISA"Worker"gt ltDEF-CATEGORY NAME"AdministrativeS
taff" ISA"Worker"gt ltDEF-CATEGORY NAME"Student"
ISA"Person"gt ltDEF-CATEGORY NAME"PostDoc"
ISA"Faculty"gtltDEF-CATEGORY NAME"Lecturer"
ISA"Faculty"gt ltDEF-CATEGORY NAME"Professor"
ISA"Faculty"gt ltDEF-CATEGORY NAME"ResearchAssist
ant" ISA"Assistant"gt ltDEF-CATEGORY
NAME"TeachingAssistant" ISA"Assistant"gtltDEF-CAT
EGORY NAME"GraduateStudent" ISA"Student"gt
ltDEF-CATEGORY NAME"UndergraduateStudent"
ISA"Student"gtltDEF-CATEGORY NAME"Secretary"
ISA"AdministrativeStaff"gt ltDEF-CATEGORY
NAME"Chair" ISA"AdministrativeStaff Professor"gt
Note that Organization, Publication, and Person
subcategorize from base.SHOEEntity, that is, the
category SHOEEntity declared in base-ontology.
SHOEEntity is the accepted "root" category for
all categories you'll declare in an ontology,
elements at the top of your category hierarchy
should subcategorize from it.
Multiple Inheritance
13SHOE Base Ontology
- This ontology is declared in this document both
in human-readable form (what you see in front of
you now) and machine-readable SHOE form (which
you can see from viewing the html source of this
document) . This base ontology is compatible with
version 1.0 of SHOE. 1. Declared Types - This ontology declares four basic types, listed
below along with their description. - STRING HTML String Literals, as defined in the
HTML 2.0 specification. - NUMBER Floating-point numerical constants.
Knowledge-agents should be able to read common
floating-point numbers like 2, 2.0, -1.432e4,
etc. - DATE Date/Timestamps following RFC 1123, as
shown in section 3.3.1 of the HTTP/1.0
specification. - TRUTH HTML String Literals of the form YES or
NO, case-insensitive.
14SHOE Base Ontology
- 2. ISA Hierarchy (Taxonomy)
- The following taxonomy is the collection of
categories declared in this ontology. The
hierarchical form is intended to show the ISA
chain. - Entity SHOEEntity
- Entity The top level of all SHOE
classifications. You should not subclass from
Entity--usually you should subclass from
SHOEEntity or one of its subclasses instead.
Entity exists to give the base ontology some
flexibility for later versions.SHOEEntity This
should be the root (ancestor) category for all
categories declared in SHOE ontologies (other
than the Base Ontology). All categories are best
hung off of SHOEEntity or a subcategory.
Entity
SHOEEntity
15Part of cs-dept-ontology
- base.Entity base.SHOEEntity
Person Worker
Faculty
Professor
AssistantProfessor
AssociateProfessor
FullProfessor
VisitingProfessor
Lecturer
PostDoc
Assistant
ResearchAssistant
TeachingAssistant
AdministrativeStaff
Director
Chair Professor
Dean Professor
ClericalStaff
SystemsStaff Student
UndergraduateStudent
GraduateStudent
Organization
Department
School
16SHOE Base Ontology
- 3. Relationships
- Relationships are declared between one or more
arguments. Relationship arguments are either
types or are categories. If the argument is a
category, any subcategory of that category is
valid as well. - Relation Argument 1
Argument 2
description Entity STRING name
Entity STRING description This is
a human-readable description of a particular
instance. name This is a human-readable name
for a particular instance. Note that STRING is
used without a period (as in ".STRING") because
this is the base ontology, where it is declared.
In other ontologies you make, you should use the
period or a full prefix chain to refer to it and
other types, relations, and categories declared
in the base ontology.
17Creating a Basic Ontology (contd)
- Now, let's add to our ontology some simple
relationships between elements of different
categories. - students have professors as advisors.
- organizations have members.
- people author publications
18Creating a Basic Ontology
- ltDEF-RELATION NAME"advisor"gt ltDEF-ARG POS"1"
TYPE"Student"gt ltDEF-ARG POS"2"
TYPE"Professor"gt lt/DEF-RELATIONgt ltDEF-RELATION
NAME"member"gt ltDEF-ARG POS"1"
TYPE"Organization"gt ltDEF-ARG POS"2"
TYPE"Person"gtlt/DEF-RELATIONgtltDEF-RELATION
NAME"publicationAuthor"gt ltDEF-ARG POS"1"
TYPE"Publication"gt ltDEF-ARG POS"2"
TYPE"Person"gt lt/DEF-RELATIONgtPOS is used
define the position of the arguments 1...n -
19Creating a Basic Ontology
- It's also often useful to use relationships
other than just classifications. We can also have
the following kinds of relationships with
specific kinds of data types - publications are published on a date.
- students' age is a number.
- everything can have a name which is a string
(that is, a phrase like "Robert Kohout"). - whether a professor is tenured or not is a truth
(a value of "YES" or "NO")
20Creating a Basic Ontology
- ltDEF-RELATION NAME"publicationDate"gt ltDEF-ARG
POS"1" TYPE"Publication"gt ltDEF-ARG POS"2"
TYPE".DATE"gtlt/DEF-RELATIONgtltDEF-RELATION
NAME"age"gt ltDEF-ARG POS"1" TYPE"Person"gt ltDEF
-ARG POS"2" TYPE".NUMBER"gtlt/DEF-RELATIONgtltDEF-
RELATION NAME"name"gt ltDEF-ARG POS"1"
TYPE"base.SHOEEntity"gt ltDEF-ARG POS"2"
TYPE".STRING"gtlt/DEF-RELATIONgtltDEF-RELATION
NAME"tenured"gt ltDEF-ARG POS"1"
TYPE"Professor"gt ltDEF-ARG POS"2"
TYPE".TRUTH"gtlt/DEF-RELATIONgtlt/ONTOLOGYgt lt/BODYgt
lt/HTMLgtThe dot . is used as an abbreviation
for accessingelements of the SHOE base ontology. -
21Annotating a HTML document
- ltHTMLgtltHEADgt ltTITLEgtMy Pagelt/TITLEgt lt/HEADgt
ltBODYgt ltPgt Hi, this is my web page. I am a
graduate student and a research assistant. lt/Pgt
ltPgt Also, I'm 52 years old. lt/Pgt ltPgt My name
is George Stephanopolous. lt/Pgt ltPgt Here is a
pointer to my ltA HREF"http//www.cs.umd.edu/smith
"gt graduate advisor.lt/Agtlt/Pgt ltPgt And ltA
HREF"http//www.cs.umd.edu/papers/paper.ps"gt is
a paper I recently wrote. lth3gt Brun Hilda lt/h3gt
Brun Hilda is a visiting lecturer here from
Germany who doesn't have her own web page.
However, because I am such a nice person, I have
agreed to let part of my web page space belong to
her. She is 23. lt/BODYgtlt/HTMLgt
22Annotating an HTML document
- This page tells us
- That the web page is about a
- graduate student
- research assistant
- The person's name is George Stephanopolous.
- The person is 52 years old.
- The person's graduate advisor is
http//www.cs.umd.edu/smith - The person is the author of the paper
http//www.cs.umd.edu/papers/paper.ps - Further, we've learned some interesting facts
about Brun Hilda - She's a lecturer.
- She is 23 years old.
- Her name is Brun Hilda.
23Annotating an HTML document
- It so happens that we want to tell these exact
things to intelligent agents and other
knowledge-gatherers. To do this, we first need to
tell the robot that we're using SHOE and uniquely
define our document as an instance. - An instance is similar to an "entity" as defined
in the database world. However, we don't use the
term "entity" because "entity" already in common
use in another way in HTML and SGML. We begin by
declaring that our page uses SHOE 1.0-compliant
tags. To do this, in the HEAD section of our
document, we add - ltMETA HTTP-EQUIV"SHOE" CONTENT"VERSION1.0"gt
24Annotating an HTML document
- Instances and KeysBefore we can add semantic
information to our web page, we need to define
one or more instances, which are data objects
which we will classify or relate to one another.
It's paramount that instance be unique from one
another--we wouldn't want two people writing
instances with the same name. SHOE handles this
by associating with each instance a unique key.
SHOE has a standard protocol for coming up with
a key for instances base them on one (and only
one) URL for the web page they're found on. For
example, an instance about my dog Fido, found on
some web page http//www.example.com/example.html,
might have the key "http//www.example.com/exampl
e.htmlfido". Or Richard Nixon's home page
might contain a single instance with just his URL
as key "http//www.whitehouse.gov/trickydick.html
". A web page might have many URLs that lead to
it, so you'll have to pick which one you'll use
as its official key and stick with that. This
effectively guarantees that instance on other
documents can't have the same keys as ones on
your document, since no two documents can share
the same URL (unless one went away and the other
replaced it).ltINSTANCE KEY"http//www.cs.umd.ed
u/users/george/"gt
25Annotating an HTML document
- Then declare which ontology will be used..
- ltUSE-ONTOLOGY ID"cs-dept-ontology"
URL"http//www.cs.umd.edu/projects/plus/SHOE/onts
/cs.html" VERSION"1.0" PREFIX"cs"gt
26Annotating an HTML document
- CategorizationNext, we'll classify or
categorize the instance we're declaring on this
web page--that is, we'll declare what the
instance concerns. In SHOE, categorization is
done using the CATEGORY tag in conjunction with
one or more categories we've picked from the
ontology we're using. In the body of the
document, we'll add - ltCATEGORY NAME"cs.GraduateStudent"gtltCATEGORY
NAME"cs.ResearchAssistant"gt This says that
this instance belongs to the classes or
categories "GraduateStudent" and
"ResearchAssistant" as defined in the ontology
we've defined to use the "cs." prefix (i.e.,
cs-dept-ontology).
27Annotating an HTML document
- Declaring RelationshipsNext we'd like to tell
web robots about relationships to other instances
and data. We'll start with the relationships
between the instance we're creating and some
ordinary data like our name and age. - ltRELATION NAME"cs.name"gt ltARG POS1
VALUE"http//www.cs.umd.edu/users/george/"gt ltARG
POS2 VALUE"George Stephanopolous"gt lt/RELATIONgt
ltRELATION NAME"cs.age"gt ltARG POS1
VALUE"http//www.cs.umd.edu/users/george/"gt ltARG
POS2 VALUE"52"gt lt/RELATIONgt
28Annotating an HTML document
- A Nested InstanceFinally, poor Brun Hilda, who
only exists World-Wide-Web-wise as a mention on
our web page, should get an instance all her own
so we can declare facts about her. Brun Hilda
will be sharing space on George's web page, so
her instance needs a URL different from his
instance, but also based on his URL. -
29Annotating an HTML document
- ltINSTANCE KEY"http//www.cs.umd.edu/users/geor
ge/BRUNHILDA"gt ltCATEGORY NAME"cs.Lecturer"gtlt
RELATION NAME "cs.namegt ltARG POSTO
VALUE"Brun Hildagtlt/RELATIONgtltRELATION
NAME"cs.age"gt ltARG POSTO VALUE"23gtlt/RELATION
gtlt/INSTANCEgt
30Annotating an HTML document
- Final ProductltINSTANCE KEY"http//www.cs.umd.ed
u/users/george/"gt ltUSE-ONTOLOGY
ID"cs-dept-ontology" URL"http//www.cs.umd.edu/p
rojects/plus/SHOE/onts/cs.html" VERSION"1.0"
PREFIX"cs"gt ltCATEGORY NAME"cs.GraduateStudent"
gt ltCATEGORY NAME"cs.ResearchAssistant"gt
ltRELATION NAME"cs.name"gt ltARG POSTO
VALUE"George Stephanopolous"gt lt/RELATIONgtltRELAT
ION NAME"cs.age"gt ltARG POSTO
VALUE"52"gtlt/RELATIONgtltRELATION
NAME"cs.advisor"gt ltARG POSTO
VALUE"http//www.cs.umd.edu/users/smith"gt
lt/RELATIONgt
31Annotating an HTML document
- ltINSTANCE KEY"http//www.cs.umd.edu/users/ge
orge/BRUNHILDA"gt ltCATEGORY NAME"cs.Lecturergt
ltRELATION NAME "cs.name"gt ltARG POSTO
VALUE"Brun Hilda"gt lt/RELATIONgt ltRELATION
NAME"cs.agegt ltARG POSTO VALUE"23gt lt/RELATI
ONgt lt/INSTANCEgtlt/INSTANCEgtlt/BODYgt lt/HTMLgt
32Inferences in SHOE Ontologies
- Ontologies don't just declare hierarchical
categories and valid relationships. They may also
declare things that may be inferred from existant
claims. - Let's say we wanted to add to our
cs-dept-ontology the inference that if someone
claims to be a member of an organization, and
that organization is a suborganization of a
second organization, then the person is also a
member of that second organization. - This would save people from claiming that they're
both a member of a research group and its
department, for example.Horn-Clauses are used
to specify inference-rules in SHOE. -
33Inferences in SHOE Ontologies
- To do this, we should first lay this inference
out in a logical format called a Horn Clause. A
Horn clause consists of a head and a body,
separated with a "-". In the head and body are
claims the body can have more than one claim,
joined with a "", which means "and". Claims in a
Horn clause usually contain variables, which are
wildcards that can be matched against anything,
so long as variables of the same name are matched
to the same thing. Here's our inference in a Horn
Clause (we'll put question marks in front of
variables) - member(?org2,?person) - member(?org1,?person)
subOrganizationOf(?org1,?org2) - This is read as "?person is a member of ?org2 if
?person is a member of ?org1 and ?org1 is a
suborganization of ?org2". In the
cs-dept-ontology, this would be written as
follows
34Inferences in SHOE Ontologies
- ltDEF-INFERENCE DESCRIPTION"member(?org2,?person)
if member(?org1,?person) and subOrganizationOf(?o
rg1,?org2)"gt ltINF-IFgt ltRELATION
NAME"member"gt ltARG POS1 VALUE"org1"
USAGEVARgt ltARG POS2 VALUE"per" USAGEVARgt
lt/RELATIONgt ltRELATION NAME"subOrganizationOf"
gt ltARG POS1 VALUE"org1" USAGEVARgt ltARG
POS2 VALUE"org2" USAGEVARgt lt/RELATIONgt
lt/INF-IFgt ltINF-THENgt ltRELATION
NAME"member"gt ltARG POS1 VALUE"org2"
USAGEVARgt ltARG POS2 VALUE"per"
USAGEVARgt lt/RELATIONgtlt/INF-THENgtlt/DEF-INFERENC
Egt
35References
- http//www.cs.umd.edu/projects/plus/SHOE
36- Thanks for Listening meHacettepe University