1 / 65

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

This material was developed with financial help of the WUSA fund of Austria. Semantic Web. Content. Markup Languages. XML (eXtended Markup Language). RDF (Resource Description Framework). OWL (Ontology Web Language). OWL-S (OWL for Services). Semantic Search. Markup Languages.

Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Semantic Web Content • Markup Languages • XML (eXtended 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

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

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

  5. 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 (eXtended Markup Language) Data description language (structure) Enables data exchange on a global basis by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

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

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

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

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

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

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

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

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

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

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

  16. Namespaces and URIs • namespaces provide a method to avoid element name conflicts xmlns:namespace-prefix="namespaceURI" • 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.w3.org/TR/html4/"> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> • using a default namespace <table xmlns="http://www.w3.org/TR/html4/"> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

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

  18. 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]>

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

  20. 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 note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  21. 2 XML Schema Definition (XSD) <!–- “note.xsd” --> <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns=http://www.w3schools.com> <xs:element name="note"> <xs:complexType> <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:complexType> </xs:element> </xs:schema> elements defined in “note.xsd” came from w3schools Complex element (have attributes or other elements) default namespace decimal, integer, boolean, date, time Simple elements (contain only text) by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  22. 2 XML Schema Definition (XSD) • XML document has a reference to an XML schema <?xml version="1.0"?> <note xmlns="http://www.w3schools.com"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.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

  23. 2 XML Schema Restrictions <xs:element name="password"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[a-zA-Z0-9]{8}"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="age"> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:minInclusive value="0"/> <xs:maxInclusive value="100"/> </xs:restriction> </xs:simpleType> </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

  24. 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> <date> <day>12</day> <month>11</month> <year>2002</year> </date> <to>Toma</to> <from>Suzana</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> <note date="12/11/2002" to="Toma" from=“Suzana" heading="Reminder" body="Don't forget me this weekend!"> </note> <note day="12" month="11" year="2002" to="Toma" from=“Suzana" heading="Reminder" body="Don't forget me this weekend!"> </note> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

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

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

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

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

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

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

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

  32. <rdf:Bag> example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.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

  33. "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

  34. <rdf:Alt> example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.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

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

  36. RDF Schema • focused on defining taxonomies (class hierarchy) • can express classes and their relations (subClassOf) • 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

  37. RDF Schema Class Example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://example.org/schemas/vehicles"> ... <rdfs:Class rdf:ID="MiniVan"> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/> </rdfs:Class> </rdf:RDF> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  38. RDF Schema Property Example <rdf:Property rdf:ID="registeredTo"> <rdfs:domain rdf:resource="#MotorVehicle"/> <rdfs:range rdf:resource="#Person"/> </rdf:Property> <rdf:Property rdf:ID="rearSeatLegRoom"> <rdfs:domain rdf:resource="#PassengerVehicle"/> <rdfs:range rdf:resource="&xsd;integer"/> </rdf:Property> The registeredTo property applies to any MotorVehicle and its value is a Person by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  39. RDF Schema Instance Example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/schemas/vehicles#" xml:base="http://example.org/things"> <ex:PassengerVehicle rdf:ID="johnSmithsCar"> <ex:registeredTo rdf:resource="http://www.example.org/staffid/85740“ /> <ex:rearSeatLegRoom rdf:datatype="&xsd;integer">127</ex:rearSeatLegRoom> </ex:PassengerVehicle> </rdf:RDF> #Person type Instance is described in a separate document from the schema. by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

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

  41. "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

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

  43. Ontology Headers <rdf:RDF xmlns:owl ="http://www.w3.org/2002/07/owl#" xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd =http://www.w3.org/2001/XMLSchema# xmlns:vin ="http://www.w3.org/TR/2004/REC-owl-guide- 20040210/wine#“ xmlns:food="http://www.w3.org/TR/2004/REC-owl-guide- 20040210/food#"> <owl:Ontology rdf:about=""> <rdfs:comment>An example OWL ontology</rdfs:comment> <owl:priorVersion rdf:resource= "http://www.w3.org/TR/2003/PR-owl-guide-20031215/wine"/> <owl:imports rdf:resource= "http://www.w3.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

  44. 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="ConsumableThing"/> Within this document, the Region class can now be referred to using #Region, e.g. rdf:resource="#Region" <owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="food:PotableLiquid"/> <rdfs:label xml:lang="en">wine</rdfs:label> <rdfs:label xml:lang="fr">vin</rdfs:label> ... </owl:Class> <owl:Class rdf:ID="Pasta"> <rdfs:subClassOf rdf:resource="#EdibleThing" /> ... </owl:Class> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  45. Individuals <Region rdf:ID="CentralCoastRegion" /> Identical in the meaning to the example below: <owl:Thing rdf:ID="CentralCoastRegion" /> <owl:Thing rdf:about="#CentralCoastRegion"> <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

  46. Properties • Two types of properties: • DATATYPE PROPERTIES, relations between instances of classes and RDF literals and XML Schema datatypes <owl:Class rdf:ID="VintageYear" /> <owl:DatatypeProperty rdf:ID="yearValue"> <rdfs:domain rdf:resource="#VintageYear" /> <rdfs:range rdf:resource="&xsd;positiveInteger"/> </owl:DatatypeProperty> • OBJECT PROPERTIES, relations between instances of two classes <owl:ObjectProperty rdf:ID="locatedIn"> <rdfs:domain rdf:resource="http://www.w3.org/2002/07/owl#Thing" /> <rdfs:range rdf:resource="#Region" /> </owl:ObjectProperty> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  47. Properties of Individuals <Region rdf:ID="SantaCruzMountainsRegion"> <locatedIn rdf:resource="#CaliforniaRegion" /> </Region> • locatedIn is object property defined for Region instances <VintageYear rdf:ID="Year1998"> <yearValue rdf:datatype="&xsd;positiveInteger"> 1998 </yearValue> </VintageYear> • yearValue is datatype property defined for VintageYear instances by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  48. Property Characteristics 1. Transitive property P(x,y) and P(y,z) implies P(x,z) locatedIn is transitive property <owl:ObjectProperty rdf:ID="locatedIn"> <rdf:type rdf:resource="owl:TransitiveProperty" /> <rdfs:domain rdf:resource="owl:Thing" /> <rdfs:range rdf:resource="#Region" /> </owl:ObjectProperty> <Region rdf:ID="SantaCruzMountainsRegion"> <locatedIn rdf:resource="#CaliforniaRegion" /> </Region> <Region rdf:ID="CaliforniaRegion"> <locatedIn rdf:resource="#USRegion" /> </Region> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

  49. Property Characteristics 2. Symmetric Property P(x,y) iff P(y,x) adjacentRegion is symmetric property <owl:ObjectProperty rdf:ID="adjacentRegion"> <rdf:type rdf:resource="&owl;SymmetricProperty" /> <rdfs:domain rdf:resource="#Region" /> <rdfs:range rdf:resource="#Region" /> </owl:ObjectProperty> <Region rdf:ID=“SumadijaRegion"> <locatedIn rdf:resource="#SerbiaRegion" /> <adjacentRegion rdf:resource="#PomoravljeRegion" /> </Region> by Miloš Micić, mailto: milmic@galeb.etf.bg.ac.yu

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

More Related