Knowledge Representation and Reasoning

Knowledge Representation and Reasoning

Master of Science in Artificial Intelligence, 2010-2012 Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea http://turing.cs.pub.ro/krr_10 curs.cs.pub.ro Lecture 8 KR for the Semantic Web Lecture outline

The Semantic Web RDF OWL Correspondences OWL Example Conditions OWL Dialects 2 1. The Semantic Web Web was invented by Tim Berners-Lee (amongst others), a physicist working at CERN ... a goal of the Web was that, if the interaction between person and hypertext could be so intuitive that the machine-readable information

space gave an accurate representation of the state of people's thoughts, interactions, and work patterns, then machine analysis could become a very powerful management tool, seeing patterns in our work and facilitating our working together through the typical problems which beset the management of large organizations. TBLs original vision of the Web was much more ambitious than the reality of the existing (syntactic) Web TBL (and others) have since been working towards realising this vision, which has become known as the Semantic Web E.g., article in May 2001 issue of Scientific American 3 Scientific American, May 2001 e B

r a w o e h t f H e e p y

4 Beware of the Hype A hype cycle is a graphic representation of the maturity, adoption and business application of a specific technology. Since 1995, Gartner has used hype cycles to characterize the over-enthusiasm or "hype" and subsequent disappointment that typically happens with the introduction of new technologies 5 Beware of the Hype Hype seems to suggest that Semantic Web means: semantics + web = AI

A new form of Web content that is meaningful to computers will unleash a revolution of new abilities More realistic to think of it as meaning: semantics + web + AI = more useful web Realising the complete vision is too hard for now (probably) But we can make a start by adding semantic annotation to web resources

6 Images from Christine Thompson and David Booth Today: the Syntactic Web A hypermedia, a digital library A library of documents called (web pages) interconnected by a hypermedia of links A database, an application platform A common portal to applications accessible through web pages, and presenting their results as web pages A platform for multimedia e.g., BBC Radio anywhere in the world A naming scheme Unique identity for those documents A place where computers do the presentation (easy) and people do the linking and interpreting (hard). 7

Impossible (?) using the Syntactic Web Complex queries involving background knowledge Find information about animals that use sonar but are not either bats or dolphins Locating information in data repositories Travel enquiries Prices of goods and services Results of human genome experiments

Finding and using web services Visualise surface interactions between two proteins Delegating complex tasks to web agents Book me a holiday next weekend somewhere warm, not too far away, and where they speak French or English 8 What is the Problem? Make web resources more accessible to automated processes

Extend existing rendering markup with semantic markup Metadata annotations that describe content/function of web accessible resources Use Ontologies to provide vocabulary for annotations Formal specification is accessible to machines 9 Ontology in Philosophy Ontology = a philosophical discipline - a branch of philosophy that deals with the nature and the organisation of reality

Science of Being (Aristotle, Metaphysics, IV, 1) "the science of being qua being" Tries to answer the questions: What characterizes being? Eventually, what is being? 10 Ontology in Computer Science A specification of a conceptualization or a set of knowledge terms for a particular domain, including The vocabulary: concepts and relations The semantic interconnections: relationships among concepts and relations Some rules of inference

An ontology describes a formal specification of a certain domain: Shared understanding of a domain of interest Formal and machine manipulable model of a domain of interest 11 The Semantic Web Stack 12 Parenthesis The Web Services Stack ebXML Registries UDDI

ebXML CPA OWL-S Service Model OWL-S Service WSCL Profile OWL-S Service Grounding OWL RDF PSL BPEL4WS

BPML WS-AtomicTransaction and WSXLANG BusinessActivity WS-Reliable WS-Coordination Messaging WS-Security WSCL WS-Policy WSDL SOAP BTP

WSCI ebXML BPSS Discovery Contracts and agreements Process and workflow orchestrations QoS: Transactions QoS: Choreography QoS: Conversations ebXML QoS: Service CPP descriptions and bindings

ebXML messaging Messaging XML, DTD, and XML Schema Encoding HTTP, FTP, SMTP, SIP, etc. Transport Schema from Service-Oriented Computing: Semantics, Processes, Agents Munindar P. Singh and Michael N. Huhns, Wiley, 2005 13 2. RDF Provides a basis for knowledge representation

Based on KR ideas (frames) but uses the Web to enhance interoperability XML Gives a document tree Doesnt identify the content represented by a document, where content means Concepts the document is about Relationships among them Enables multiple representations for the same content 14 RDF RDF captures descriptions of resources A resource is an addressable object Of which a description can be given

Which is identified via a URI (Uniform Resource Identifier) A literal is something simpler A value, e.g., string or integer Cannot be given a description 15 RDF RDF is based on a simple grammar An RDF document is just a set of statements or triples Each statement consists of Subject: a resource Object: a resource or a literal

Predicate: a resource RDF uses: XML serialization Standard XML namespace syntax Namespaces are defined by the RDF standard Typically abbreviated rdf and rdfs Comes with RDFS - a meta-vocabulary 16 RDF

Service-Oriented Computing Munindar Michael Wiley Service-Oriented Computing: Semantics, Processes, Agents Munindar P. Singh and Michael N. Huhns, Wiley, 2005 17 RDF Schema Analogous to an object-oriented type system built on top of RDF. RDFS defines: rdfs:Class, rdfs:subClassOf

rdfs:Resource, rdfs:Literal rdfs:Property, rdfs:subPropertyOf rdfs:range, rdfs:domain rdfs:label, rdfs:comment, rdfs:seeAlso OWL - greatly enhances the above 18 3. OWL OWL standardizes additional constructs to be able to capture more meaning Builds on RDF, by limiting it Gives formal semantics to new terms

Based on description logic DL Concepts = OWL Classes DL individuals = OWL Individuals DL Roles = OWL Properties 19 OWL Entities and Relationships rdfs:Class rdfs:Datatype rdfs:subClassOf owl:DataRange owl:equivalentClass

owl:Class owl:disjointWith rdf:domain rdf:Property rdf:range x owl:equivalentProperty owl:inverseOf owl:Object Property rdfs:subPropertyOf owl:Datatype

Property rdf:subPropertyOf owl:Functional Property owl:equivalentProperty owl:Inverse Functional Property owl:Symmetric Property owl:Transitive Property

Picture from Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns, Wiley 2005 20 3.1 OWL Classes OWL Classes correspond to concepts in DL owl:Class defined as a subclass of rdfs:Class All OWL classes are members of owl:Class Owl have some predefined classes: Predefined class owl:Thing top of class hierarchy (T) Predefined class owl:Nothing no instances, bottom of hierarchy, a subclass of any other class () 21 Classes Simple examples:

rdf:ID defines the name of the class Region may be referred as rdf:resource="#Region" may be used to extend the class "Winery" 22 Subclasses Class definitions A class may have superclasses

23 Subclasses Subclasses/Superclasses define a subsumtion relation ... DL equivalent Pasta ConsumableThing Use x Pasta(x) ConsumableThing(x)

... Pasta EdibleThing 24 3.2 Individuals Describe members of a class Declare an individual named CentralCoastRegion as a member of class Region CentralCoastRegion: Region This is equivalent to

rdf:type is an RDF property which links an individual to the class to which belongs 25 Individuals

26 3.3 Properties 2 types of properties: Object properties (a) instances of owl:ObjectProperty pred(x,y) x: inst class y: inst class relate instances of 2 classes domain + range = instances of owl:Class ; are owl:Thing (unless otherwise specified)

Data type properties (b) instances of owl:DatatypeProperty relate an instance of a class with an instance of a data type domain is the same ; range = an instance of rdfs:DataType and is an owl:DataRange pred(x,y) x: inst class y: inst data type 27 (a) Object properties A sequence of OWL elements are (implicitly) linked by conjunctions Examples of object properties

madeFromGrape.T Wine x madeFromGrape(y,x) Wine(y) T madeFromGrape.WineGrape x madeFromGrape(y,x) WineGrape(x) 28 Properties and sub-properties

rdfs:subPropertyOf rdfs:domain rdfs:range rdfs:equivalentProperty rdfs:inverseOf only for object properties 29 Another example of object properties

... hasWineDescriptor WineDescriptor

Wine hasColor WineColor 30 (b) Data type properties Represent relations between class instances and data types XML Schema All OWL engines must support at least the data types: xsd:integer si xsd:string Example yearValue binds owl:Thing to positive integer values

31 More on properties R is Transitive if and only if xRy and yRz imply xRz R is Symmetric if and only if xRy iff yRx R is Functional if and only if xRy and xRz implies y = z R1 and R2 are Inverse Properties if and only if xR1y iff yR2x 32 Examples taken from the Wine Ontology http://www.w3.org/TR/owl-guide/wine.rdf http://oaei.ontologymatching.org/tests/102/onto.html 33

3.4 Class constructors How can we build a class? (a) By specifying a class name (b) By specifying a class name + descendancy (c) By using logical operators: owl:IntersectionOf ( ), owl:unionOf ( ), owl:complementOf ( ) or enumeration owl:oneOf (list all individuals) Used generally with the data type rdf:parseType='Collection' (d) Impose restrictions on properties = powerful mechanism 34

Class constructors 35 Restrictions Allows building classes based on restrictions applied to properties (d) The objects that satisfy the restriction on the property make an anonymous class owl:Restriction subclass of owl:Class A restriction may be of 2 types owl:ObjectRestriction applied to an Object Property owl:DataRestriction applied to a Data type Property The property on which the restriction applies is specified by owl:onProperty 36

Restrictions 1 Wine 1 madeFromGrape ... The blue part defines an anonymous class comprising all objects which have property madeFromGrape The definition of class Wine says that the individuals which are Wine are also members of this anonymous class

Every Wine individual must participate in at least one madeFromGrape relation 37 Combining logical operators

38 Combining logical operators Different from: Fruit SweetFruit

NonSweetFruit Fruit SweetFruit NonSweetFruit 39 Combining logical operators

SweetRedFruit SweetFruit Different from: SweetRedFruit SweetFruit RedFruit RedFruit

40 Combining logical operators

41 Enumeration 42 Restrictions

USACompany locatedIn:USA Company 43 Restrictions

EuropeanCompany Company locatedIn.EuropeanCountry 44 Restrictions

Person

hasChild.(Doctor 45 hasChild.Doctor) 3.5 Axioms Classes Individuals Properties 46 4. Correspondences OWL Manchester syntax DL

47 Syntactic correspondences Constructors OWL intersectionOf unionOf complementOf subClassOf equivalentClass Manchester DL and or not

48 Semantic correspondences Constructors OWL intersectionOf unionOf complementOf subClassOf equivalentClass Manchester DL - sem and or not CI = DI for any interpretation

49 Syntactic correspondences Restrictions OWL someValuesFrom allValuesFrom hasValue minCardinality cardinality maxCardinality Manchester some only value min

exactly max DL : = 50 Semantic correspondences Restrictions Manchester

some only value min exactly max DL sem 51 Fem Pers and GenFem Barb Pers and not GenFem Mama Fem and areCopil some Per Tata Barb and areCopil some Pers Parinte Tata or Mama Bunica Mama and areCopil some Parinte

MamaCuMultiCopii Mama and areCopil min 3 Pers MamaFaraFiica Mama and areCopil only (not Fem) 5. OWL Example Consider an academic setting where students take courses and courses are offered by departments. Further, assume that each course is offered by exactly one department. CS is a department, a student must take at least one course, and a full-time student must take between three and five courses. Object Properties: takes, offers, offeredBy Other classes: CSCourse, FullTimeStudent, CS FullTimeStudent 53

takes, offers, offeredBy 54 Student We have captured all constraints except that a student must take at least 1 course

1 55 FullTimeStudent

3 5 56 CSCourse

57 CSFullTimeStudent

58 6. Necessary conditions Necessary conditions define the conditions that an individual has to fulfill in order to be an instance of a concept Mother subClassOf Fem and hasChild some Pers if maria is an instance of Mother then it is also an instance of Fem and has at least one child if ioana is an instance of Fem and has at least one child ioana is not recognized as an instance of Mother Partially defined Class (concept) 59 Necessary and sufficient conditions

Necessary and suficient conditions define the conditions that, if an individual fulfills, then the individual is an instance of a concept Mother Fem and hasChild some Pers In this case if ioana is an instance of Fem and has at least one child then ioana is recognized as an instance of Mother Totally defined Class (concept) 60 OWA Open World Assumption If something is not known this does not mean it is false Cal Cal areCalaret.Femeie

areCalaret.Barbat May have also Copil as areCalaret Closure axiom (to "close" the world) Cal areCalaret.(Femeie Barbat) 61 7. OWL Dialects OWL DL - the core dialect, includes DL primitives; not necessarily (but often practically) tractable OWL Lite - adds restrictions to OWL DL to make it tractable (card 0 or 1, no disjunction); OWL Full - lifts restrictions to allow other interpretations; extremely general; potentially intractable (undecidable); included just for fancy expressiveness needs

e.g., in OWL Full a class may be treated as a collection of individuals and as an individual in the same time 62 Credits Some slides are based on the book Service-Oriented Computing: Semantics, Processes, Agents Munindar P. Singh and Michael N. Huhns, Wiley, 2005 63

Recently Viewed Presentations

  • Poetry 3: Life and Death

    Poetry 3: Life and Death

    W. H. Auden Four Weddings and a Funeral - "Funeral Blues" Stop all the clocks, cut off the telephone (cont'd) He was my North, my South, my East and West, My working week and my Sunday rest, My noon, my...
  • Powerpoint template for scientific posters (Swarthmore College)

    Powerpoint template for scientific posters (Swarthmore College)

    The exponential variable specifies the asymptotic behavior, commonly referred to as "heavy tails" When exponential variable is equal to 2, distribution is normal. Conclusion Special Cases of the Alpha-Stable Distribution For α=1 and β=0 the distribution reduces to a Cauchy...
  • Is your graph SALTy?

    Is your graph SALTy?

    Accurate horizontal and vertical scales chosen. The independent variable is shown on the horizontal (across) axis.. The . dependent. variable is shown on the . vertical (up-down) axis.
  • Understanding Understanding the the Role Role of of

    Understanding Understanding the the Role Role of of

    Beth Estill Formative Assessment: Definition by W. James Popham "Formative Assessment is a planned process in which assessment-elicited evidence of students' status is used by teachers to adjust their ongoing instructional procedures or by students to adjust their current learning...
  • Overview of Competition Law

    Overview of Competition Law

    The Competition & Consumer Act (2010), previously known as the Trade Practices Act (1974) ... Usually refers to a situation where one business (or more) has rivals who limit its ability to set prices.
  • Diapositiva 1 - milnumb.com

    Diapositiva 1 - milnumb.com

    El valor más importante de una empresa son los productos que desarrolla.Para tener éxito es imprescindible que estos aporten beneficios para el cliente, es decir, que:. Tengan buena calidad, Se hagan con buenos materiales,
  • Using APES to Write Short Answer Responses

    Using APES to Write Short Answer Responses

    This video can help you embed your quotes by introducing a strategy called TSQ. It was one of your homework videos and it is extremely helpful. Please take your notes on your worksheet.
  • Pintores Hispanos

    Pintores Hispanos

    * * * Pintores de habla hispana En esta presentación conocerás a algunos de los pintores más famosos de la de España y de América. Conocerás a Velázquez, Goya, Picasso, Diego Rivera, Frida Kahlo, Remedios Varo, Salvador Dalí y Fernando...