shoe (simple html ontology extensions)

36
Simple HTML Ontology Extensions Ahmet Selman Bozkır Hacettepe University Computer Eng. Dept.

Upload: selman-bozkir

Post on 28-Nov-2014

255 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: SHOE (simple html ontology extensions)

Simple HTML Ontology Extensions

Ahmet Selman BozkırHacettepe University Computer Eng. Dept.

Page 2: SHOE (simple html ontology extensions)

Contents• What’s 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

Page 3: SHOE (simple html ontology extensions)

What’s 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?

Page 4: SHOE (simple html ontology extensions)

What’s 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.

Page 5: SHOE (simple html ontology extensions)

What’s 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.

Page 6: SHOE (simple html ontology extensions)

What’s 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 DAML+OIL. These languages are results of standardization efforts that are in part based on SHOE

Page 7: SHOE (simple html ontology extensions)

What 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-representation 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.

Page 8: SHOE (simple html ontology extensions)

Specifications

• Everything is started with adding this startup tag into head of your classic HTML document.

<META HTTP-EQUIV="SHOE" CONTENT="VERSION=1.0">

• You may use this logo that represents your web page supports SHOE.

Page 9: SHOE (simple html ontology extensions)

Specifications

SHOE uses the following additional tags as an extension to HTML:For the definition of ontologies:

ONTOLOGY, /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 additionally:

INSTANCE, /INSTANCE.

Page 10: SHOE (simple html ontology extensions)

Creating a Basic Ontology <HTML>

<HEAD><!--Indication that this document is conformant with SHOE 1.0->

<META HTTP-EQUIV="SHOE" CONTENT="VERSION=1.0“><TITLE> Our CS Ontology </TITLE></HEAD><BODY>

<!--Declaration of the ontology‘s name and version--><ONTOLOGY ID="cs-dept-ontology" VERSION="1.0“>

<!--Declaration to use another yet existing ontology--><USE-ONTOLOGY ID="base-ontology" VERSION="1.0"

PREFIX="base” URL="http://www.cs.umd.edu/projects/plus/SHOE/base.html">

• The prefix “base” is used to indicate explicit references to elementsof the imported base ontology.

Page 11: SHOE (simple html ontology extensions)

Creating 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:

Page 12: SHOE (simple html ontology extensions)

Creating a Basic Ontology • <!-- Here we lay out our category hierarchy -->

<DEF-CATEGORY NAME="Organization" ISA="base.SHOEEntity"> <DEF-CATEGORY NAME="Person" ISA="base.SHOEEntity"> <DEF-CATEGORY NAME="Publication" ISA="base.SHOEEntity"> <DEF-CATEGORY NAME="ResearchGroup" ISA="Organization"> <DEF-CATEGORY NAME="Department" ISA="Organization"> <DEF-CATEGORY NAME="Worker" ISA="Person"> <DEF-CATEGORY NAME="Faculty" ISA="Worker"> <DEF-CATEGORY NAME="Assistant" ISA="Worker"> <DEF-CATEGORY NAME="AdministrativeStaff" ISA="Worker"> <DEF-CATEGORY NAME="Student" ISA="Person"> <DEF-CATEGORY NAME="PostDoc" ISA="Faculty"><DEF-CATEGORY NAME="Lecturer" ISA="Faculty"> <DEF-CATEGORY NAME="Professor" ISA="Faculty"> <DEF-CATEGORY NAME="ResearchAssistant" ISA="Assistant"> <DEF-CATEGORY NAME="TeachingAssistant" ISA="Assistant"><DEF-CATEGORY NAME="GraduateStudent" ISA="Student"> <DEF-CATEGORY NAME="UndergraduateStudent" ISA="Student"><DEF-CATEGORY NAME="Secretary" ISA="AdministrativeStaff"> <DEF-CATEGORY NAME="Chair" ISA="AdministrativeStaff Professor">

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

Page 13: SHOE (simple html ontology extensions)

SHOE Base OntologyThis 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.432e+4, 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.

Page 14: SHOE (simple html ontology extensions)

SHOE Base Ontology2. 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

Page 15: SHOE (simple html ontology extensions)

Part 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

Page 16: SHOE (simple html ontology extensions)

SHOE Base Ontology3. 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.

Page 17: SHOE (simple html ontology extensions)

Creating a Basic Ontology (cont’d)

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

Page 18: SHOE (simple html ontology extensions)

Creating a Basic Ontology

<DEF-RELATION NAME="advisor"><DEF-ARG POS="1" TYPE="Student"> <DEF-ARG POS="2" TYPE="Professor">

</DEF-RELATION> <DEF-RELATION NAME="member">

<DEF-ARG POS="1" TYPE="Organization"><DEF-ARG POS="2" TYPE="Person">

</DEF-RELATION><DEF-RELATION NAME="publicationAuthor">

<DEF-ARG POS="1" TYPE="Publication"><DEF-ARG POS="2" TYPE="Person">

</DEF-RELATION>

POS is used define the position of the arguments: 1...n

Page 19: SHOE (simple html ontology extensions)

Creating 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")

Page 20: SHOE (simple html ontology extensions)

Creating a Basic Ontology • <DEF-RELATION NAME="publicationDate">

<DEF-ARG POS="1" TYPE="Publication"><DEF-ARG POS="2" TYPE=".DATE">

</DEF-RELATION><DEF-RELATION NAME="age">

<DEF-ARG POS="1" TYPE="Person"><DEF-ARG POS="2" TYPE=".NUMBER">

</DEF-RELATION><DEF-RELATION NAME="name">

<DEF-ARG POS="1" TYPE="base.SHOEEntity"><DEF-ARG POS="2" TYPE=".STRING">

</DEF-RELATION><DEF-RELATION NAME="tenured">

<DEF-ARG POS="1" TYPE="Professor"><DEF-ARG POS="2" TYPE=".TRUTH">

</DEF-RELATION></ONTOLOGY> </BODY></HTML>

The dot “.” is used as an abbreviation for accessingelements of the SHOE base ontology.

Page 21: SHOE (simple html ontology extensions)

Annotating a HTML document<HTML><HEAD>

<TITLE>My Page</TITLE> </HEAD>

<BODY><P> Hi, this is my web page. I am a graduate student and a

research assistant. </P> <P> Also, I'm 52 years old. </P><P> My name is George Stephanopolous. </P><P> Here is a pointer to my <A

HREF="http://www.cs.umd.edu/smith"> graduate advisor.</A></P> <P> And <A HREF="http://www.cs.umd.edu/papers/paper.ps"> is a

paper I recently wrote. <h3> Brun Hilda </h3> 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. </BODY></HTML>

Page 22: SHOE (simple html ontology extensions)

Annotating an HTML documentThis 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.

Page 23: SHOE (simple html ontology extensions)

Annotating 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:

<META HTTP-EQUIV="SHOE" CONTENT="VERSION=1.0">

Page 24: SHOE (simple html ontology extensions)

Annotating an HTML documentInstances and Keys

Before 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/example.html#fido".

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).

<INSTANCE KEY="http://www.cs.umd.edu/users/george/">

Page 25: SHOE (simple html ontology extensions)

Annotating an HTML documentThen declare which ontology will be used..

<USE-ONTOLOGY ID="cs-dept-ontology" URL="http://www.cs.umd.edu/projects/plus/SHOE/onts/cs.html" VERSION="1.0" PREFIX="cs">

Page 26: SHOE (simple html ontology extensions)

Annotating an HTML document

Categorization

Next, 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:

•<CATEGORY NAME="cs.GraduateStudent"><CATEGORY NAME="cs.ResearchAssistant">

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).

Page 27: SHOE (simple html ontology extensions)

Annotating an HTML documentDeclaring Relationships

Next 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.

<RELATION NAME="cs.name"> <ARG POS=1 VALUE="http://www.cs.umd.edu/users/george/"> <ARG POS=2 VALUE="George Stephanopolous"> </RELATION>

<RELATION NAME="cs.age"> <ARG POS=1 VALUE="http://www.cs.umd.edu/users/george/"> <ARG POS=2 VALUE="52"> </RELATION>

Page 28: SHOE (simple html ontology extensions)

Annotating an HTML documentA Nested Instance

Finally, 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.

Page 29: SHOE (simple html ontology extensions)

Annotating an HTML document

<INSTANCE KEY="http://www.cs.umd.edu/users/george/#BRUNHILDA">

<CATEGORY NAME="cs.Lecturer">

<RELATION NAME= "cs.name“><ARG POS=TO VALUE="Brun Hilda“>

</RELATION><RELATION NAME="cs.age">

<ARG POS=TO VALUE="23“></RELATION></INSTANCE>

Page 30: SHOE (simple html ontology extensions)

Annotating an HTML document• Final Product:

<INSTANCE KEY="http://www.cs.umd.edu/users/george/"> <USE-ONTOLOGY ID="cs-dept-ontology" URL="http://www.cs.umd.edu/projects/plus/SHOE/onts/cs.html" VERSION="1.0" PREFIX="cs">

<CATEGORY NAME="cs.GraduateStudent"><CATEGORY NAME="cs.ResearchAssistant">

<RELATION NAME="cs.name">

<ARG POS=TO VALUE="George Stephanopolous"> </RELATION><RELATION NAME="cs.age">

<ARG POS=TO VALUE="52"></RELATION><RELATION NAME="cs.advisor">

<ARG POS=TO VALUE="http://www.cs.umd.edu/users/smith"> </RELATION>

Page 31: SHOE (simple html ontology extensions)

Annotating an HTML document <INSTANCE KEY="http://www.cs.umd.edu/users/george/#BRUNHILDA">

<CATEGORY NAME="cs.Lecturer“><RELATION NAME= "cs.name">

<ARG POS=TO VALUE="Brun Hilda"></RELATION><RELATION NAME="cs.age“>

<ARG POS=TO VALUE="23“></RELATION></INSTANCE>

</INSTANCE>

</BODY> </HTML>

Page 32: SHOE (simple html ontology extensions)

Inferences 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.

Page 33: SHOE (simple html ontology extensions)

Inferences 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:

Page 34: SHOE (simple html ontology extensions)

Inferences in SHOE Ontologies <DEF-INFERENCE DESCRIPTION="member(?org2,?person) if member(?org1,?person) and subOrganizationOf(?org1,?org2)">

<INF-IF><RELATION NAME="member">

<ARG POS=1 VALUE="org1" USAGE=VAR><ARG POS=2 VALUE="per" USAGE=VAR>

</RELATION> <RELATION NAME="subOrganizationOf">

<ARG POS=1 VALUE="org1" USAGE=VAR> <ARG POS=2 VALUE="org2" USAGE=VAR>

</RELATION> </INF-IF> <INF-THEN>

<RELATION NAME="member"><ARG POS=1 VALUE="org2" USAGE=VAR><ARG POS=2 VALUE="per" USAGE=VAR>

</RELATION></INF-THEN></DEF-INFERENCE>

Page 35: SHOE (simple html ontology extensions)

References• http://www.cs.umd.edu/projects/plus/SHOE

Page 36: SHOE (simple html ontology extensions)

Thanks for Listening meHacettepe University