Ontologies and Semantic Web - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Ontologies and Semantic Web

Description:

Nasce come linguaggio per 'codificare conoscenza' sulle pagine ... RDF descrive un data model. Permette di fare affermazioni del tipo: item123 rdf:type Tenda ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 38
Provided by: Chris1662
Category:

less

Transcript and Presenter's Notes

Title: Ontologies and Semantic Web


1
Ontologies and Semantic Web
2
Resource Description Framework (RDF)
  • RDF
  • Nasce come linguaggio per codificare conoscenza
    sulle pagine Web in modo da renderle
    interpretabili da agenti software che cercano
    informazioni
  • Utilizzato anche in altri contesti
    (rappresentazione interna alle applicazioni,
    interscambio e riutilizzo di informazioni tra
    applicazioni diverse)
  • RDF è specificamente pensato per
  • Fornire un modello semplice (esistono solo
    triple) per la rappresentazione della conoscenza
  • Creare strutture di dati distribuite e
    interconnesse
  • Aggregare informazioni provenienti da diverse
    fonti
  • In un certo senso RDF è per le macchine quello
    che HTML è per gli umani
  • HTML permette di distribuire sul web e
    interconnettere (tramite hiperlinks) contenuto
    interpretabile da umani (pagine web)
  • RDF permette di distribuire sul web e
    interconnettere contenuto interpretabile da
    macchine.

3
Machine understandable?
  • The concept of machine-understandable
  • documents does not imply some magical
  • artificial intelligence which allows machines to
  • comprehend human mumblings. It only
  • indicates a machine's ability to solve a
    well-defined
  • problem by performing well-defined
  • operations on existing well-defined data.
  • Instead of asking machines to understand
  • people's language, it involves asking people to
  • make the extra effort.
  • - Tim Berners-Lee -

4
RDF è sufficiente?
  • RDF descrive un data model
  • Permette di fare affermazioni del tipo
  • item123 ? rdftype ? Tenda item123 ? exprezzo ?
    100 euro
  • Per strutturare dati in un certo dominio (es.
    negozio di articoli da campeggio) ho bisogno di
  • Termini (parole, concetti) con un preciso
    significato
  • Relazioni che legano i concetti del dominio
  • Specifiche su come queste relazioni possono
    essere usate
  • Etc.
  • Voglio poter dire ad esempio che, parlando di
    articoli da campeggio
  • Una tenda è uno dei possibili articoli da
    campeggio
  • Una canadese è una tenda particolare
  • Una tenda deve avere un prezzo
  • Il prezzo di una tenda deve essere un numero
    (possibilmente espresso in euro)
  • Una roulotte ha una funzione simile ad una tenda
    (?)
  • Etc.
  • ? Quello che mi serve si chiama Ontologia

5
What is an ontology?
  • Una definizione illustre (Tom Gruber, AI
    specialist at Stanford University)
  • http//www-ksl.stanford.edu/kst/what-is-an-ontolog
    y.html
  • Ontology definition
  • explicit formal specifications of the terms in
    the domain and relations among them
  • - Gruber 1993 -

6
Knowledge representation in AI
7
What is an ontology?
  • a formal explicit description of concepts in a
    domain of discourse
  • Defines
  • Classes - a formal explicit description of
    concepts in a domain of discourse
  • Can have subclasses ? more specific concepts
  • Properties - features and attributes of the
    concept, but also relationships among Classes
  • Restrictions on properties rule which
    properties and classes, having the restricted
    property, obey to

8
Esempio
Boxes Neri ? classi dellontologia Rosso ?
istanze (individui)
Company
Person
Is-a (type)
Sub-Class-Of
Employee
Foo Inc.
Is-a (type)
Works-for
John Doe
Software
Expert-of
9
Rules?
  • There is no one correct way to model a domain
    there are always viable alternatives. The best
    solution almost always depends on the application
    that you have in mind and the extensions that you
    anticipate.
  • 2) Ontology development is necessarily an
    iterative process.
  • 3) Concepts in the ontology should be close to
    objects (physical or logical) and relationships
    in your domain of interest. These are most likely
    to be nouns (objects) or verbs (relationships) in
    sentences that describe your domain.

10
What to do
  • In practical terms, developing an ontology
    includes
  • defining classes in the ontology,
  • arranging the classes in a taxonomic
    (subclasssuperclass) hierarchy,
  • defining properties and describing allowed values
    for these properties,
  • filling in the values for slots for instances.

11
Steps
  • Determine the domain and scope of the ontology
  • Enumerate important terms in the ontology
  • Consider reusing existing ontologies
  • http//www.schemaweb.info
  • http//swoogle.org

12
Steps Define the classes and the class hierarchy
  • Different approaches
  • Top-down
  • Bottom-up
  • Combined
  • So which one?
  • None of these three methods is inherently better
    than any of the others.
  • The approach t o
  • take depends strongly on the personal view of the
    domain.

13
Define the classes and the class hierarchy
  • A subclass of a class represents a concept that
    is a kind of the concept that the superclass
    represents.
  • not a part of
  • Wine subclass of Wines ? WRONG
  • Subclass relation is transitive
  • chardonnay is-a red wine ? chardonnay is-a wine
  • Avoiding class cycles
  • A? B, B ? A, WRONG

14
Define the properties of classes
  • Properties can be
  • intrinsic, the flavor of a wine (red, white)
  • In general do not change in time (can think of a
    blue wine?)
  • extrinsic, wines name, and production area
  • Subject to change in time (a new wine, producer,
    area)
  • parts, wheels of a car, arms of a man
  • relationships to other individuals, a person
    knows an other person, a wine in produced by a
    winery

15
Define the properties of classes
Properties Body Color Tannin level
inherited from Wine Body Color
Wine
White
Red
  • Properties will be inherited
  • ?A slot should be attached at the most general
    class that can have that property.

16
Define the facets of the slots
  • Properties have facets which describe their
    possible values
  • Restriction on cardinality
  • A person can have only one Mother
  • Restriction on value type
  • Data-type
  • String, number, boolean, enumerated
  • Instances type
  • Only an instance of the class woman can be the
    mother of a person.

17
Domain and Range
  • Property produces
  • Domain Winery
  • Range Wine
  • General rule
  • When defining a domain or a range for a slot,
    find the most general class that can be
    respectively the domain or the range for the
    slots

18
Siblings in a class hierarchy
  • All the siblings in the hierarchy (except for the
    ones at the root) must be at the same level of
    generality.

Wine
Wine
White Wine
Red wine
White Wine
Rosso Conero
Rosso conero
19
How many subclasses?
  • only one direct subclass ? perhaps some modeling
    problem
  • A lot of subclasses ? perhaps intermediate
    classes nedeed

20
When to introduce a new class (or not)
Instrument
Ho una ontologia base di strumenti
musicali. Voglio aggiungere i concetti di
produttore e modello di chitarra
Piano
Guitar
Posso introdurre nuove classi nella gerarchia
Warning usare extrinsic properties per creare
nuove classi porta ad una potenziale instabilità
dellontologia (nuovi modelli sono modifiche alla
gerarchia) e crescita esponenziale del numero di
classi
Esempio introduco un produttore (Eko) che
produce gli stessi modelli di Gibson
Problema Anche se i modelli sono gli stessi,
sono costretto a fare classi distinte
21
When to introduce a new class (or not)
  • Altra soluzione, usare relazioni e separare le
    gerarchie

Guitar Model
Guitar Producer
Les Paul
Flying V
Gibson
Eko
Fender
A livello di istanza specifico modello e
produttore come valori degli slot MyGuitar
Producer Eko, Model Les Paul
22
When to introduce a new class (or not)
  • How important the concept of is in our domain?
  • White and red wine are important and stable
    distinction in their domain ? distinct classes
    (WhiteWine, RedWine)
  • Subclasses of a class usually
  • (1) have additional properties that the
    superclass does not have, or
  • (2) restrictions different from those of the
    superclass, or
  • (3) participate in different relationships than
    the superclasses
  • But also exceptions
  • Well known and accepted classification already
    present in the domain

23
An instance or a class?
  • Individual instances are the most specific
    concepts represented in a knowledge base.
  • The ontology should not contain all the possible
    information about the domain do not specialize
    (or generalize) more than you need for your
    application

24
Languages comparison
25
XMLSchema vs OWL/RDFS
OWL/RDFS
  • XML SCHEMA
  • Article
  • ID
  • type
  • Document
  • picture
  • ID
  • reporter
  • name
  • oppure
  • Document
  • Article attrID
  • photo attrID
  • reporter attrname

OwlClass
Document
owlsubclassOf
owlsubclassOf
Article
pubhas_id
pubhas_picture
Literal
Picture
pubmade_picture
Reporter
26
Non proprio
Article
pubhas_picture
pubhas_picture
Picture
rdfsrange
rdfsdomain
Article
Picture
27
OWL what?
  • Core of the World Wide Web Consortiums Semantic
  • Web activity
  • In various senses a successor to previous work on
  • Web-friendly knowledge modelling languages
  • ! RDF RDF Schema
  • ! DAML-ONT
  • ! OIL / DAMLOIL
  • W3Cs Web Ontology Working Group are a whos
  • who of the knowledge representation field
  • Last Call Working Drafts issued in late March -
    closed
  • on May 9 2003 final recommendation will then
    follow

28
XML, RDF OWL
  • XML universal syntax
  • XML Schema defines structure of XML docs
  • RDF datamodel for resource objects
  • RDF Schema basic vocabulary for defining RDF
  • classes properties, and hierarchies of each
  • OWL extended vocab for defining classes
  • properties, including
  • ! cardinality (e.g. minCardinality 1)
  • ! equality (e.g. equivalentClass)
  • ! relationships between classes (e.g.
    disjointWith)
  • ! characteristics of properties (e.g.
  • FunctionalProperty)

29
OWL sublanguages (species)
  • OWL Lite
  • ! RDF-and-a-half
  • ! Mainly intended for class hierarchies simple
  • constraints (cardinality 0 or 1, equality, )
  • OWL DL
  • ! Description Logic theoretical properties
  • ! Intended where completeness decidability are
  • an issue
  • OWL Full
  • ! Max expressivity no computational guarantees
  • ! Supports Web-scale Web-style KRR

30
(No Transcript)
31
(No Transcript)
32
Defining an owlClass (I)
  • By class identifier (Lite, DL, Full)
  • ltowlClass rdfID"Lecturer"gt
  • ltrdfssubClassOf rdfresource"Person" /gt
  • lt/owlClassgt
  • By enumeration (DL, Full)
  • ltowlClass rdfID"ComputingOfficer"gt
  • ltowloneOf rdfparseType"Collection"gt
  • ltAcademic rdfabout"nmurray" /gt
  • ltAcademic rdfabout"jmartin" /gt
  • ltAcademic rdfabout"mritchie" /gt
  • lt/owloneOfgt
  • lt/owlClassgt

33
Defining an owlClass (II)
  • By property restriction (Lite, DL, Full)
  • ltowlClass rdfID"Researcher"gt
  • ltrdfssubClassOfgt
  • ltowlRestrictiongt
  • ltowlonProperty rdfresource"activity" /gt
  • ltowlsomeValuesFrom rdfresource"ResearchAre
    a" /gt
  • lt/owlRestrictiongt
  • lt/rdfssubClassOfgt
  • lt/owlClassgt
  • By intersection/union/complement (DL,Full)
  • ltowlClass rdfID"UniversityStaff"gt
  • ltowlunionOf rdfparseType"Collection"gt
  • ltowlClass rdfabout"Lecturer" /gt
  • ltowlClass rdfabout"Researcher" /gt
  • ltowlClass rdfabout"ComputingOfficer" /gt
  • lt/owlunionOfgt

34
Properties in OWL
  • Two types
  • ! ObjectProperty - relations between instances
    of classes
  • ! DatatypeProperty - relates an instance to an
    rdfsLiteral or XML Schema datatype
  • (Both rdfssubClassOf rdfProperty)
  • ltowlDatatypeProperty rdfID"name"gt
  • ltrdfsdomain rdfresource"Person" /gt
  • ltrdfsrange rdfresource "http//www.w3.org/2001
    /XMLSchema/string" /gt
  • lt/owlDatatypePropertygt
  • ltowlObjectProperty rdfIDactivity"gt
  • ltrdfsdomain rdfresource"Person" /gt
  • ltrdfsrange rdfresource"ActivityArea" /gt
  • lt/owl ObjectPropertygt

35
Individuals (Instances)
  • Individual axioms (facts)
  • OWL is not only a language for defining
    ontologies - it is used to define their instances
    (Individuals)
  • Example
  • ltLecturer rdfID"apreece"gt
  • ltnamegtAlun Preecelt/namegt
  • ltactivity rdfresource"AgentsResearch" /gt
  • ltactivity rdfresource"WebTeaching" /gt
  • lt/Lecturergt
  • ltResearchArea rdfID"AgentsResearch/gt
  • ltTeachingArea rdfIDWebTeaching/gt
  • (Notice how individual apreece follows the
    definition
  • of Lecturer given earlier)

36
Tools for the semantic web
  • Modeling RDF,RDFS,OWL graphs
  • Jena(http//jena.sourceforge.net/ ),
    Sesame(http//openrdf.org ),..
  • Databases and query languages
  • SerQL, SPARQL, RQL
  • Ontology editing
  • Protège (http//protege.stanford.edu/ ), Swoop
    (http//www.mindswap.org/2004/SWOOP/ )

37
Query language SerQL
  • Included in the Sesame project
  • SQL-like Syntax
  • Example
  • select X from X rdftype cultPainter
  • cultpaints lthttp//www.icom.com/schema.r
    dfexhibitedgt lthttp//usuarios.lycos.es/alerian/
    quintadelsordo.htmlgt
  • using namespace
  • cult lthttp//www.icom.com/schema.rdfgt,
  • adm lthttp//www.oclc.org/schema.rdfgt

rdftype
quintadelsordo.html
X
cultPainter
cultexhibited
cultpaints
38
Sesame
Documentation http//www.openrdf.org/doc/sesame/u
sers/ch07.htmlfigure-sesame-arch-api
Write a Comment
User Comments (0)
About PowerShow.com