This material was developed with financial help of

  • Slides: 65
Download presentation
This material was developed with financial help of the WUSA fund of Austria. 1/65

This material was developed with financial help of the WUSA fund of Austria. 1/65

Semantic Web Content • Markup Languages • XML (e. Xtended Markup Language) • RDF

Semantic Web Content • Markup Languages • XML (e. Xtended Markup Language) • RDF (Resource Description Framework) • OWL (Ontology Web Language) • OWL-S (OWL for Services) • Semantic Search by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 2/65

Markup Languages by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 3/65

Markup Languages by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 3/65

History of Markup Languages § text based software applications requirement The text contained within

History of Markup Languages § text based software applications requirement The text contained within the documents were “marked up” using textual commands, explaining how to print the document. § development of GML (Generalized Markup Language) Integrated text editing Formatting and information retrieval Separated formatting from the document’s text by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 4/65

History of Markup Languages § development of SGML (Standard GML) Text description language (structure

History of Markup Languages § development of SGML (Standard GML) Text description language (structure and content) International standard in 1986 Base for other markup languages (HTML, XML…) § development of XML (e. Xtended Markup Language) Data description language (structure) Enables data exchange on a global basis by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 5/65

History of Markup Languages OWL RDF XML HTML SGML 1970 1990 2000 by Miloš

History of Markup Languages OWL RDF XML HTML SGML 1970 1990 2000 by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 2010 6/65

Parts of SGML Document § Declaration specifies which characters and delimiters may appear §

Parts of SGML Document § Declaration specifies which characters and delimiters may appear § DTD (Document Type Definition) syntax of markup constructs document elements element hierarchy possible sequence of tags required number of element occurrences § Specification describes the semantic to be ascribed to the markup § Document Instances contain data and markup contain a reference to the DTD to be used for interpretation by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 7/65

Pieces of Electronic Document § content § markup by Miloš Micić, mailto: milmic@galeb. etf.

Pieces of Electronic Document § content § markup by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 8/65

Markup Language Pyramid ? ? ? ? ? Semantics+reasoning Relational Data Exchange by Miloš

Markup Language Pyramid ? ? ? ? ? Semantics+reasoning Relational Data Exchange by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 9/65

The Relationship between SGML, HTML and XML § SGML complete document language can define

The Relationship between SGML, HTML and XML § SGML complete document language can define other markup languages SGML § XML subset of SGML work with Web data XML HTML also can define other markup languages § HTML display data specific DTD of SGML by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 10/65

Developing Semantic Web § XML enables data exchange but says nothing about meaning §

Developing Semantic Web § XML enables data exchange but says nothing about meaning § Goal is to provide reasoning rules § Development roadmap, stepping stone: knowledge representation Inference ontology search by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 11/65

Ontology Programs have to know that two terms have the same meaning. Solution is

Ontology Programs have to know that two terms have the same meaning. Solution is collection of information called ontology. § Ontology = document that defines the relations between terms. Ontology=<taxonomy, inference rules> Taxonomy=<{classes}, {relations}> Example: “If a city code is associated with a state code, and an address uses that city code, than that address has the associated state code”. A program could deduce, that an ETF address, being in Belgrade, must be in Serbia which is in the SCG and therefore should be formatted to SCG standards. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 12/65

Family of XML Markup Languages by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu

Family of XML Markup Languages by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 13/65

XML Introduction § designed to describe data § does not DO anything Someone must

XML Introduction § designed to describe data § does not DO anything Someone must write a piece of software to send, receive or display it. § cross-platform, software and hardware independent <note> <to>Toma</to> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 14/65

XML Introduction § XML tags not predefined case-sensitive properly nested hierarchy (without overlapping) §

XML Introduction § XML tags not predefined case-sensitive properly nested hierarchy (without overlapping) § XML can separate data from HTML § Mayor portions of the XML document (six ingredients) 1. XML Declaration (required) 2. Document Type Definition (or XML Schema) 3. Elements (required) 4. Attributes 5. Entity 6. Notations by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 15/65

Namespaces and URIs § namespaces provide a method to avoid element name conflicts xmlns:

Namespaces and URIs § namespaces provide a method to avoid element name conflicts xmlns: namespace-prefix="namespace. URI" § URI (Uniform Resource Identifier) is a string of characters which identifies Internet Resource. URI ensure that concepts are not just words in a document, but are tied to a unique definition that everyone can find on the Web. <h: table xmlns: h="http: //www. w 3. org/TR/html 4/"> <h: tr> <h: td>Apples</h: td> <h: td>Bananas</h: td> </h: tr> </h: table> § using a default namespace <table xmlns="http: //www. w 3. org/TR/html 4/"> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 16/65

1 XML Declaration <? xml version=“ 1. 0” encoding =“ISO-8859 -1”? > <note> <to>Toma</to>

1 XML Declaration <? xml version=“ 1. 0” encoding =“ISO-8859 -1”? > <note> <to>Toma</to> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> § document prolog § announcement to XML processor that the document is marked up in XML 17/65

2 Document Type Definition (DTD) § structural description of the XML document § used

2 Document Type Definition (DTD) § structural description of the XML document § used for validating XML document Referring to a DTD is a request that the parser compare the document instance to a document model. § defines a legal building blocks of XML document § optional but useful <? xml version=“ 1. 0” encoding =“ISO-8859 -1”? > <!DOCTYPE note SYSTEM "note. dtd">. . . (internal definition) or (for internal DTD) <!DOCTYPE root_element [element_declaration]> 18/65

2 Internal DTD, Example <? xml version="1. 0"? > <!DOCTYPE note [ <!ELEMENT note

2 Internal DTD, Example <? xml version="1. 0"? > <!DOCTYPE note [ <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Toma</to> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend</body> </note> 19/65

2 External DTD, Example <? xml version="1. 0"? > <!DOCTYPE note SYSTEM "note. dtd">

2 External DTD, Example <? xml version="1. 0"? > <!DOCTYPE note SYSTEM "note. dtd"> <note> <to>Toma</to> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend</body> </note> <!–- “note. dtd” --> <!ELEMENT <!ELEMENT note (to, from, heading, body)> to (#PCDATA)> from (#PCDATA)> heading (#PCDATA)> body (#PCDATA)> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 20/65

2 XML Schema Definition (XSD) elements defined in “note. xsd” came from w 3

2 XML Schema Definition (XSD) elements defined in “note. xsd” came from w 3 schools default namespace <!–- “note. xsd” --> <? xml version="1. 0"? > <xs: schema xmlns: xs="http: //www. w 3. org/2001/XMLSchema" target. Namespace="http: //www. w 3 schools. com" xmlns=http: //www. w 3 schools. com> Complex element (have attributes or other elements) <xs: element name="note"> <xs: complex. Type> <xs: sequence> <xs: element name="to" type="xs: string"/> <xs: element name="from" type="xs: string"/> <xs: element name="heading" type="xs: string"/> <xs: element name="body" type="xs: string"/> </xs: sequence> </xs: complex. Type> </xs: element> </xs: schema> Simple elements (contain only text) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu decimal, integer, boolean, date, time 21/65

2 XML Schema Definition (XSD) § XML document has a reference to an XML

2 XML Schema Definition (XSD) § XML document has a reference to an XML schema <? xml version="1. 0"? > <note xmlns="http: //www. w 3 schools. com" xmlns: xsi="http: //www. w 3. org/2001/XMLSchema-instance" xsi: schema. Location="http: //www. w 3 schools. com note. xsd"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 22/65

2 XML Schema Restrictions <xs: element name="password"> <xs: simple. Type> <xs: restriction base="xs: string">

2 XML Schema Restrictions <xs: element name="password"> <xs: simple. Type> <xs: restriction base="xs: string"> <xs: pattern value="[a-z. A-Z 0 -9]{8}"/> </xs: restriction> </xs: simple. Type> </xs: element> <xs: element name="age"> <xs: simple. Type> <xs: restriction base="xs: integer"> <xs: min. Inclusive value="0"/> <xs: max. Inclusive value="100"/> </xs: restriction> </xs: simple. Type> </xs: element> § restrictions on a set of values § restrictions on a series of values § restrictions on length by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 23/65

3 XML Elements § building blocks of a document § nested hierarchy (parent –

3 XML Elements § building blocks of a document § nested hierarchy (parent – children relation) § only one root element § names must not start with “xml”, “XML” … 4 XML Attributes § can be used to give an element a unique ID <note> <note date="12/11/2002" to="Toma" <date> from=“Suzana" heading="Reminder" body="Don't forget me this weekend!"> <day>12</day> </note> <month>11</month> <year>2002</year> <note day="12" month="11" year="2002" </date> to="Toma" from=“Suzana" heading="Reminder" <to>Toma</to> body="Don't forget me this weekend!"> </note> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 24/65

XML Family Tree XML Validation Languages DTD XML Location Languages XML Schema DOM SAX

XML Family Tree XML Validation Languages DTD XML Location Languages XML Schema DOM SAX XML Display Languages XPATH XPOINTER & XLINK XML Web Services Languages XSLT XSL-FO SOAP WSDL by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu UDDI 25/65

Resource Description Framework (RDF) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 26/65

Resource Description Framework (RDF) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 26/65

by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 27/65

by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 27/65

§ XML -> RDF provide extra machine understandable layer Resource Subject The book Property

§ XML -> RDF provide extra machine understandable layer Resource Subject The book Property Value Predicate has the title Object War and Peace <? xml version=“ 1. 0”? > <rdf: RDF xmlns: rdf=“http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#” xmlns: dc=“http: //purl. org/dc/elements/1. 1/”> Predicate <rdf: Description rdf: about=“http: //www. amazon. com/books”> <dc: title>War and Peace</dc: title> <rdf: Description> </rdf: RDF> Object by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu Subject 28/65

"there is a Person identified by http: //www. w 3. org/ People/EM/contact#me, whose name

"there is a Person identified by http: //www. w 3. org/ People/EM/contact#me, whose name is Eric Miller, whose email address is em@w 3. org, and whose title is Dr. " by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 29/65

Four important facts about RDF triplets 1. Each RDF triple is made up of

Four important facts about RDF triplets 1. Each RDF triple is made up of S, P, O. 2. Each RDF triple is complete and unique fact. 3. Subject is uri reference or blank node (represent a resource that isn’t currently identified). Predicate is uriref. Object is uri reference, blank node or literal. 4. Each RDF triple can be joined to other RDF triples, but still retains its own unique meaning, regardless of complexity. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 30/65

Container Vocabulary <rdf: Bag> used to describe a list of values that is intended

Container Vocabulary <rdf: Bag> used to describe a list of values that is intended to be unordered. <rdf: Seq> used to describe a list of values that is intended to be ordered (For example, in alphabetical order) <rdf: Alt> used to describe a list of alternative values (the user can select only one of the values). by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 31/65

<rdf: Bag> example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w

<rdf: Bag> example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: cd="http: //www. recshop. fake/cd#"> <rdf: Description rdf: about="http: //www. recshop. fake/cd/Beatles"> <cd: artist> <rdf: Bag> <rdf: li>John</rdf: li> <rdf: li>Paul</rdf: li> <rdf: li>George</rdf: li> <rdf: li>Ringo</rdf: li> </rdf: Bag> </cd: artist> </rdf: Description> </rdf: RDF> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 32/65

"Course 6. 001 has the students Amy, Mohamed, Johann, Maria, and Phuong" <rdf: Bag>

"Course 6. 001 has the students Amy, Mohamed, Johann, Maria, and Phuong" <rdf: Bag> example by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 33/65

<rdf: Alt> example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w

<rdf: Alt> example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: cd="http: //www. recshop. fake/cd#"> <rdf: Description rdf: about="http: //www. recshop. fake/cd/Beatles"> <cd: format> <rdf: Alt> <rdf: li>CD</rdf: li> <rdf: li>Record</rdf: li> <rdf: li>Tape</rdf: li> </rdf: Alt> </cd: format> </rdf: Description> </rdf: RDF> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 34/65

Serialization (RDF in XML) § RDF/XML is used for transporting, interchange, collection and merging

Serialization (RDF in XML) § RDF/XML is used for transporting, interchange, collection and merging of data from multiple models § RDF/XML parsers does not use DTD or XML Schema to ensure that RDF/XML is valid § There is no way to stop many individuals from independently assigning URIs to represent There could be many resources that represent the same tree !!!!!! by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 35/65

RDF Schema § focused on defining taxonomies (class hierarchy) § can express classes and

RDF Schema § focused on defining taxonomies (class hierarchy) § can express classes and their relations (sub. Class. Of) § defines properties and associate them with classes § Three most important RDF concepts: rdfs: Resource rdfs: Class rdf: Property by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 36/65

RDF Schema Class Example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www.

RDF Schema Class Example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: rdfs="http: //www. w 3. org/2000/01/rdf-schema#" xml: base="http: //example. org/schemas/vehicles">. . . <rdfs: Class rdf: ID="Mini. Van"> <rdfs: sub. Class. Of rdf: resource="#Van"/> <rdfs: sub. Class. Of rdf: resource="#Passenger. Vehicle"/> </rdfs: Class> </rdf: RDF> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 37/65

RDF Schema Property Example <rdf: Property rdf: ID="registered. To"> <rdfs: domain rdf: resource="#Motor. Vehicle"/>

RDF Schema Property Example <rdf: Property rdf: ID="registered. To"> <rdfs: domain rdf: resource="#Motor. Vehicle"/> <rdfs: range rdf: resource="#Person"/> </rdf: Property> <rdf: Property rdf: ID="rear. Seat. Leg. Room"> <rdfs: domain rdf: resource="#Passenger. Vehicle"/> <rdfs: range rdf: resource="&xsd; integer"/> </rdf: Property> The registered. To property applies to any Motor. Vehicle and its value is a Person by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 38/65

RDF Schema Instance Example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www.

RDF Schema Instance Example <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: ex="http: //example. org/schemas/vehicles#" xml: base="http: //example. org/things"> #Person type <ex: Passenger. Vehicle rdf: ID="john. Smiths. Car"> <ex: registered. To rdf: resource="http: //www. example. org/staffid/85740“ /> <ex: rear. Seat. Leg. Room rdf: datatype="&xsd; integer">127</ex: rear. Seat. Leg. Room> </ex: Passenger. Vehicle> </rdf: RDF> Instance is described in a separate document from the schema. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 39/65

Web Ontology Language (OWL) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 40/65

Web Ontology Language (OWL) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 40/65

"Tell me what wines I should buy to serve with each course of the

"Tell me what wines I should buy to serve with each course of the following menu. And, by the way, I don't like Sauternes. " § we must go beyond keywords and specify the meaning OWL is not a message format. It is a knowledge representation. § provides three sublanguages by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 41/65

OWL Sublanguages § OWL Lite classification hierarchy simple constraint features § OWL DL (Description

OWL Sublanguages § OWL Lite classification hierarchy simple constraint features § OWL DL (Description Logic) maximum expressiveness and decidability of reasoning system restrictions such as type separation (a class can not also be an individual or property, a property can not also be an individual or class) § OWL Full syntactic freedom of RDF (class can be treated simultaneously as a collection of individuals and as an individual in its own right) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 42/65

Ontology Headers <rdf: RDF xmlns: owl ="http: //www. w 3. org/2002/07/owl#" xmlns: rdf ="http:

Ontology Headers <rdf: RDF xmlns: owl ="http: //www. w 3. org/2002/07/owl#" xmlns: rdf ="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: rdfs="http: //www. w 3. org/2000/01/rdf-schema#" xmlns: xsd =http: //www. w 3. org/2001/XMLSchema# xmlns: vin ="http: //www. w 3. org/TR/2004/REC-owl-guide 20040210/wine#“ xmlns: food="http: //www. w 3. org/TR/2004/REC-owl-guide 20040210/food#"> <owl: Ontology rdf: about=""> <rdfs: comment>An example OWL ontology</rdfs: comment> <owl: prior. Version rdf: resource= "http: //www. w 3. org/TR/2003/PR-owl-guide-20031215/wine"/> <owl: imports rdf: resource= "http: //www. w 3. org/TR/2004/REC-owl-guide-20040210/food"/> <rdfs: label>Wine Ontology</rdfs: label>. . . Importing another ontology brings the entire set of assertions provided by that ontology into the current ontology by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 43/65

Classes Each user-defined class is implicitly a subclass of owl: Thing. <owl: Class rdf:

Classes Each user-defined class is implicitly a subclass of owl: Thing. <owl: Class rdf: ID="Winery"/> <owl: Class rdf: ID="Region"/> <owl: Class rdf: ID="Consumable. Thing"/> Within this document, the Region class can now be referred to using #Region, e. g. rdf: resource="#Region" <owl: Class rdf: ID="Wine"> <rdfs: sub. Class. Of rdf: resource="food: Potable. Liquid"/> <rdfs: label xml: lang="en">wine</rdfs: label> <rdfs: label xml: lang="fr">vin</rdfs: label>. . . </owl: Class> <owl: Class rdf: ID="Pasta"> <rdfs: sub. Class. Of rdf: resource="#Edible. Thing" />. . . </owl: Class> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 44/65

Individuals <Region rdf: ID="Central. Coast. Region" /> Identical in the meaning to the example

Individuals <Region rdf: ID="Central. Coast. Region" /> Identical in the meaning to the example below: <owl: Thing rdf: ID="Central. Coast. Region" /> <owl: Thing rdf: about="#Central. Coast. Region"> <rdf: type rdf: resource="#Region"/> </owl: Thing> rdf: type is an RDF property that ties an individual to a class of which it is a member by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 45/65

Properties § Two types of properties: • DATATYPE PROPERTIES, relations between instances of classes

Properties § Two types of properties: • DATATYPE PROPERTIES, relations between instances of classes and RDF literals and XML Schema datatypes <owl: Class rdf: ID="Vintage. Year" /> <owl: Datatype. Property rdf: ID="year. Value"> <rdfs: domain rdf: resource="#Vintage. Year" /> <rdfs: range rdf: resource="&xsd; positive. Integer"/> </owl: Datatype. Property> • OBJECT PROPERTIES, relations between instances of two classes <owl: Object. Property rdf: ID="located. In"> <rdfs: domain rdf: resource="http: //www. w 3. org/2002/07/owl#Thing" /> <rdfs: range rdf: resource="#Region" /> </owl: Object. Property> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 46/65

Properties of Individuals <Region rdf: ID="Santa. Cruz. Mountains. Region"> <located. In rdf: resource="#California. Region"

Properties of Individuals <Region rdf: ID="Santa. Cruz. Mountains. Region"> <located. In rdf: resource="#California. Region" /> </Region> § located. In is object property defined for Region instances <Vintage. Year rdf: ID="Year 1998"> <year. Value rdf: datatype="&xsd; positive. Integer"> 1998 </year. Value> </Vintage. Year> § year. Value is datatype property defined for Vintage. Year instances by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 47/65

Property Characteristics 1. Transitive property P(x, y) and P(y, z) implies P(x, z) located.

Property Characteristics 1. Transitive property P(x, y) and P(y, z) implies P(x, z) located. In is transitive property <owl: Object. Property rdf: ID="located. In"> <rdf: type rdf: resource="owl: Transitive. Property" /> <rdfs: domain rdf: resource="owl: Thing" /> <rdfs: range rdf: resource="#Region" /> </owl: Object. Property> <Region rdf: ID="Santa. Cruz. Mountains. Region"> <located. In rdf: resource="#California. Region" /> </Region> <Region rdf: ID="California. Region"> <located. In rdf: resource="#USRegion" /> </Region> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 48/65

Property Characteristics 2. Symmetric Property P(x, y) iff P(y, x) adjacent. Region is symmetric

Property Characteristics 2. Symmetric Property P(x, y) iff P(y, x) adjacent. Region is symmetric property <owl: Object. Property rdf: ID="adjacent. Region"> <rdf: type rdf: resource="&owl; Symmetric. Property" /> <rdfs: domain rdf: resource="#Region" /> <rdfs: range rdf: resource="#Region" /> </owl: Object. Property> <Region rdf: ID=“Sumadija. Region"> <located. In rdf: resource="#Serbia. Region" /> <adjacent. Region rdf: resource="#Pomoravlje. Region" /> </Region> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 49/65

Property Characteristics 3. Functional Property P(x, y) and P(x, z) implies y=z has. Vintage.

Property Characteristics 3. Functional Property P(x, y) and P(x, z) implies y=z has. Vintage. Year is functional property <owl: Class rdf: ID="Vintage. Year" /> <owl: Object. Property rdf: ID="has. Vintage. Year"> <rdf: type rdf: resource="owl: Functional. Property" /> <rdfs: domain rdf: resource="#Vintage" /> <rdfs: range rdf: resource="#Vintage. Year" /> </owl: Object. Property> One individual of Vintage must have strictly one value of Vintage. Year. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 50/65

Property Characteristics 4. Inverse. Of Property P(x, y) iff P(y, x) <owl: Object. Property

Property Characteristics 4. Inverse. Of Property P(x, y) iff P(y, x) <owl: Object. Property rdf: ID="has. Maker"> <rdf: type rdf: resource="&owl; Functional. Property" /> </owl: Object. Property> <owl: Object. Property rdf: ID="produces. Wine"> <owl: inverse. Of rdf: resource="#has. Maker" /> </owl: Object. Property> by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 51/65

Ontology Mapping § hardest part of ontology development § merging ontologies § tool support

Ontology Mapping § hardest part of ontology development § merging ontologies § tool support is necessary § Some important OWL primitives: equivalent. Class, equivalent. Property, same. As, different. From, All. Different by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 52/65

Equivalent Classes and Properties § combined ontologies must not be contradictory § entailments from

Equivalent Classes and Properties § combined ontologies must not be contradictory § entailments from two ontologies are combined <owl: Class rdf: ID=“o 1: caffe"> <owl: equivalent. Class rdf: resource=“o 2: bar"/> </owl: Class> indicate that two classes have precisely the same instances To tie together properties in a similar fashion, we use owl: equivalent. Property. We can use owl: same. As between two classes to indicate that they are identical in every way (in OWL Full), treating them as individuals. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 53/65

Identity between Individuals § same. As – declaring two individuals to be the same

Identity between Individuals § same. As – declaring two individuals to be the same <Wine rdf: ID="Mikes. Favorite. Wine"> <owl: same. As rdf: resource="#St. Genevieve. Texas. White" /> </Wine> § different. From – opposite to same. As <Wine. Sugar rdf: ID="Dry" /> <Wine. Sugar rdf: ID="Sweet"> <owl: different. From rdf: resource="#Dry"/> </Wine. Sugar> <Wine. Sugar rdf: ID="Off. Dry"> <owl: different. From rdf: resource="#Dry"/> <owl: different. From rdf: resource="#Sweet"/> </Wine. Sugar> If we erred, and asserted that a wine was both Dry and Sweet, without the different. From elements above, this would imply that Dry and Sweet are identical – contradiction. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 54/65

Set Operators § intersection. Of required element <owl: Class rdf: ID="White. Wine"> <owl: intersection.

Set Operators § intersection. Of required element <owl: Class rdf: ID="White. Wine"> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Wine" /> <owl: Restriction> <owl: on. Property rdf: resource="#has. Color" /> <owl: has. Value rdf: resource="#White" /> </owl: Restriction> </owl: intersection. Of> defining members of new class </owl: Class> § union. Of includes both the extensions Sweet. Fruit & Non. Sweet. Fruit <owl: Class rdf: ID="Fruit"> <owl: union. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Sweet. Fruit" /> <owl: Class rdf: about="#Non. Sweet. Fruit" /> </owl: union. Of> </owl: Class> § complement. Of selects all individuals that do not belong to a certain class by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 55/65

OWL for Services (OWL-S) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 56/65

OWL for Services (OWL-S) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 56/65

§ Web Service is a software system identified by a URI § it uses

§ Web Service is a software system identified by a URI § it uses public interfaces and bindings described by Markup Language § definition and function can be discovered by other software systems § software agents exchange information in the form of messages (Request Receive MEP – Message Exchange Pattern) by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 57/65

OWL-S Primer § OWL-S uses OWL to define a set of classes and properties

OWL-S Primer § OWL-S uses OWL to define a set of classes and properties specific to the description of a service § OWL-S is designed to perform next tasks: Task Description Discovery Locating Web Services. Invocation Execution of service by an agent or other service. Interoperation Breaking down interoperability barriers and automatic insertion of message parameter translations. Composition New services through automatic selection, composition and interoperation of existing services. Verification Verify service properties. Execution monitoring Tracking the execution of composite tasks and identifying failure cases of different exe-traces. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 58/65

Upper Ontology for Services § OWS-S define a set of classes and properties specific

Upper Ontology for Services § OWS-S define a set of classes and properties specific to the description of services. Service presents supports described by Service. Profile Service. Model Service. Grounding What does the service provide for and require How does it work? How to access to service? of agents? by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 59/65

Creating Ontology for Web Service 1. Describe individual programs Describe the individual programs that

Creating Ontology for Web Service 1. Describe individual programs Describe the individual programs that comprise the service. The process model provides a declarative description of a program’s properties. 2. Describe the grounding for each atomic process 3. Describe compositions of the atomic processes Describe the composite process which is a composition of its atomic processes 4. Describe a simple process for a service (optional) 5. Profile description Provide a declarative advertisement for the service. It is partially populated by the process model. by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 60/65

Semantic Search by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 61/65

Semantic Search by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 61/65

Designing a Search Agent § four main phases 1. Initialization agent should setup all

Designing a Search Agent § four main phases 1. Initialization agent should setup all variables, structures, and arrays, method of searching 2. Perception centered on using the knowledge provided to contact a site and retrieve the information from that location. It should identify if the target is present and identify paths to other URL 3. Action determines if the goal has been met. If it is not it has to determine the next step – this is the intelligence of the agent 4. Effect by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 62/65

Search Algorithms § uniform those that have no information about number of steps or

Search Algorithms § uniform those that have no information about number of steps or the path cost from the current state to the goal – breadth first, depth first… § informed heuristic searches have the information about the goal (estimated path cost to it or step away) best-first, hill-climbing, A*. . . How much can we trust that search engine understand what we want ? ? by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 63/65

Using RDF and OWL for Search Engines § ontologies are mapping semantically same things

Using RDF and OWL for Search Engines § ontologies are mapping semantically same things § text categorization based on ontology mapping Comparing each element of an ontology with each element of the other ontology, and than determines a similarity metric. Example of similarity metric: Instance is randomly chosen from the universe (A, B). P(A, B) is the probability that the instance belongs to A and B. . . § similarity with relational databases leads to a global semantic web database by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 64/65

Related links § http: //www. w 3 schools. com/default. asp § http: //www. w

Related links § http: //www. w 3 schools. com/default. asp § http: //www. w 3. org by Miloš Micić, mailto: milmic@galeb. etf. bg. ac. yu 65/65