Datenorientierte Systemanalyse Semantic Web Introduction Gerhard Wohlgenannt
Agenda Usecase / Teaser Grundlagen des Semantic Web - Konzepte / Ideen - Anwendungen und Probleme Technologien - Unicode, URI, XML - Triples, RDF-S DATENORIENTIERTE SYSTEMANALYSE - 1-17. JUNI 2013
Usecase: (Wind)surf-Urlaub buchen Goal: Seek a windsurfing spot with characteristics: - in February, more than 70% days with 4 Bft. - with equipment rent - avg. daily max temp. 20 C - hotel and flight available and cheap time-consuming with traditional (google) keyword search - Problem A: Precision/Recall. Find (all) relevant documents - Problem B: Need to read all documents DATENORIENTIERTE SYSTEMANALYSE - 2-17. JUNI 2013
DATENORIENTIERTE SYSTEMANALYSE - 3-17. JUNI 2013
Usecase: Vision Goal / Vision: - Do a semantic search - Get extensive list of results automatically sorted by eg. price or distance How? - Semantic annotation of resources - Clearly defined annotation languages allowing reasoning etc. DATENORIENTIERTE SYSTEMANALYSE - 4-17. JUNI 2013
Usecase - Bestandsaufnahme die notwendigen Informationen sind bereits mehr oder weniger strukturiert in elektronischer Form abrufbar Problem: intelligente Kombination der Informationsquellen Hintergrund: Ressourcen sind für Maschinen nicht verständlich DATENORIENTIERTE SYSTEMANALYSE - 5-17. JUNI 2013
Standard Technologien Information Retrieval unstrukturierte Informationsquellen Suchabfragen durchführen - Suche nach Schlüsselwörtern (Kontext fehlt!) - Datenintegration aus unterschiedlichen Quellen fehlt - Ambivalenzen, Pseudonyme,... Disambiguierung notwendig - kognitive Fähigkeiten von Computern beschränkt DATENORIENTIERTE SYSTEMANALYSE - 6-17. JUNI 2013
Current Web (vs. Semantic Web) document oriented scalable (demonstrated!) 1 global document space links as central element to connect documents DATENORIENTIERTE SYSTEMANALYSE - 7-17. JUNI 2013
Semantic Web (Web of Data) data oriented for humans and machines structured data explicit semantics of content and links a giant global graph linking is essential same architectural principles as Web of Documents - scalable, 1 data model (which is RDF, graph-based) - single global Web of data - Typed hyperlinks to connect any type of thing, eg. a person and a place with locatedin different from: Databases and Web APIs many different models, applications have to be built depending on model DATENORIENTIERTE SYSTEMANALYSE - 8-17. JUNI 2013
Semantic Web - Implementation data integrated in HTML documents, eg microformats - entities like persons, calandar data, vcard embedded in HTML documents - Problems: limited to certain entities types, no relations between entities Linked Data (data only) - Many datasets published as RDF (DBpedia Wikipedia structured data, Census data,...) - Typed Links between data (URIs), incoming and outgoing DATENORIENTIERTE SYSTEMANALYSE - 9-17. JUNI 2013
Semantic Web - The Vision (Berners-Lee, 1989) DATENORIENTIERTE SYSTEMANALYSE - 10-17. JUNI 2013
Semantic Web vs. Current Web Resource Software href href href generates dependson dependson Resource Resource Resource Document Software Software href href href isversionof Resource Document href href href href subject creator Resource Resource Resource Document Subject Person href locatedin Resource Place World Wide Web vs. Semantic Web (Koivunen und Miller, 2001). DATENORIENTIERTE SYSTEMANALYSE - 11-17. JUNI 2013
LOD cloud The LOD cloud, by Richard Cyganiak and Anja Jentzsch, Sep 2011 DATENORIENTIERTE SYSTEMANALYSE - 12-17. JUNI 2013
Anwendungen Suchmaschinen Hintergrundwissen in Abfragen: Informationen zu Tieren, welche Sonar verwenden, aber nicht Fledermäuse oder Säugetiere sind Datenaustausch zwischen Applikationen (OpenDocument Format) Delegation von komplexen Tasks an Agenten - The sort of AI task are more or less dead - Buchung von Reisen - Recommendersysteme (Kauf von Komplexen Gütern) DATENORIENTIERTE SYSTEMANALYSE - 13-17. JUNI 2013
?????? Never predict applications DATENORIENTIERTE SYSTEMANALYSE - 14-17. JUNI 2013
What uses it? BBC, Best Buy, Overstock.com, the New York Times, Amdocs, the Library of Congress, the US Department of Defense, The British Museum,... Apps like Siri, Seevl, and Attune DATENORIENTIERTE SYSTEMANALYSE - 15-17. JUNI 2013
Syntax vs. Semantic Syntax vs Semantic Syntax: Struktur von Daten (XML, RDF) Semantic: Bedeutung der Daten (OWL) Voraussetzungen für Interoperabilität: Gemeinsame Syntax (Grammatik) Gemeinsames Verständnis (Semantik, ontology) DATENORIENTIERTE SYSTEMANALYSE - 16-17. JUNI 2013
Semantic Web - Enabling Technologies (Berners-Lee) Semantic Web Stack (http://www.w3.org/2006/talks/0811-sb-w3cemergingtech/) DATENORIENTIERTE SYSTEMANALYSE - 17-17. JUNI 2013
Technology - Unicode Wie Zeichen (Symbole wie "Ä") im Rechner repräsentieren? Idee bei Encodings: Bitfolgen encodieren Zeichen Vorgänger: - ASCII (American Standard Code for Information Interchange); 7-bit Werte für Zeichen der englischen Sprache; - ISO-8859-1: 8-bit Werte; enthalten Zeichen für westeuropäische Schriften - Umsetzung: teilweise nicht standardkonform und abhängig vom Betriebssystem DATENORIENTIERTE SYSTEMANALYSE - 18-17. JUNI 2013
Technology - Unicode ASCII.. 7 bit (3,4).. zb T == 54 (hex) == 1010100 DATENORIENTIERTE SYSTEMANALYSE - 19-17. JUNI 2013
Technology - Unicode Unicode ist ein Kodierungssystem und gibt jedem Zeichen seine eigene Nummer, systemunabhängig, programmunabhängig, sprachunabhängig, erweiterbar. Unicode 6.0: definiert aktuell ca. 110.000 grafische Symbole Technische Umsetzung: - Serialisierungsformate u.a.: UTF-8 (variabel, 1-4 Byte), UTF-16 (variabel, 2-4 Byte) und UTF-32 (fix, 4 Byte) - die ersten 128 Positionen in UTF-8 entsprechen ASCII - Vorteil UTF-8: Häufige Symbole brauchen weniger Speicherplatz - Nachteil: Keine fixe Länge Verarbeitung komplizierter DATENORIENTIERTE SYSTEMANALYSE - 20-17. JUNI 2013
UTF-8 UTF-16 UTF-32 DATENORIENTIERTE SYSTEMANALYSE - 21-17. JUNI 2013
Technology - Uniform Resource Locators A uniform resource locator (URL) is a specific character string that constitutes a reference to an Internet resource. Allgemein: schema:location Für viele Anwendungen folgender hierarchischer Aufbau: schema://[user[:pwd]@]host[:port]/[path][?q][#frag] Beispiele: - mailto:lisa.maurer@tuwien.ac.at - http://www.heise.de/verify.py?browser=firefox - ldap://at.net/?dn=cn=albert,ou=admin,o=atnet,c=at DATENORIENTIERTE SYSTEMANALYSE - 22-17. JUNI 2013
URL/URIs vs linked data / Semantic Web Linked data (Semantic Web) design principles: Use of HTTP URIs to reference any object or even abstract concepts: eg. a Web page, a Person, the color green, or the locatedin relation Deferenceable Content-negotition vs Hash URIs.. see RDF slides DATENORIENTIERTE SYSTEMANALYSE - 23-17. JUNI 2013
EXtensible Markup Language (XML) Semantic Web data is often serialized in XML-based formats We won t be able to discuss XML in this course DATENORIENTIERTE SYSTEMANALYSE - 24-17. JUNI 2013
Beispiel XML-Dokument 1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Wurzelelement; weitere Person moeglich? --> 3 <Person type="student"> 4 <name>dean Venture</name> 5 <dob>08-12-90</dob> 6 <nationality>us</nationality> 7 <languages> 8 <language>de</language> 9 <language>en</language> 10 </languages> 11 <study xml:lang="en">mathematics</study> 12 <study xml:lang="de">mathematik</study> 13 </Person> DATENORIENTIERTE SYSTEMANALYSE - 25-17. JUNI 2013
RDF - Intro/Motivation SW: a stack of technologies to exchange interlinked data DATENORIENTIERTE SYSTEMANALYSE - 26-17. JUNI 2013
RDF Übersicht RDF ist ein Datenmodell zur Beschreibung von resources; Grundlegende Struktur: Graph Darstellung von Aussagen: Subject - Prädikat - Objekt (Triple) Durch Kombination von Einzelaussagen sind komplexe Konstrukte möglich. Serialisierungen: - Graphendarstellung - Turtle - RDF/XML Kurz-/Langformat DATENORIENTIERTE SYSTEMANALYSE - 27-17. JUNI 2013
RDF - Konzepte - Triple atomare Einheit: Statement (Aussage) jedes Statement ist aus einem Triple aufgebaut: Resource Eigenschaft Wert. (subj) (pred) (obj). Borbala_Nagy foaf:birthday "1980-08-12". Borbala_Nagy ems:study "mathematics". Ressourcen werden immer mit URLs (Namespaces) benannt. Literals: konkrete Werte (!=Ressourcen); ohne Datentyp immer als Strings interpretiert Subjekt und Prädikat sind immer Ressourcen. DATENORIENTIERTE SYSTEMANALYSE - 28-17. JUNI 2013
RDF - Graph - Syntax Ressourcen als Ellipsen Literals als Rechtecke Graph ist gerichtet DATENORIENTIERTE SYSTEMANALYSE - 29-17. JUNI 2013
RDF - Konzepte - Graph People foaf:person rdf:type rdf:type study mathematics Borbala Nagy EMS-Schüler hasmember foaf:birthday 1980-08-12 dc:creator http://wwwai.wu-wien.ac.at/~aweichse DATENORIENTIERTE SYSTEMANALYSE - 30-17. JUNI 2013
RDF - Populäre XML-Vokabulare Dublin Core (http://purl.org/dc/elements/1.1/#) - umfasst 15 Elemente zur Beschreibung von Webressourcen - dc:creator - der Ersteller einer Ressource - dc:subject - Thema (Schlagwörter) -... Friend of a Friend (http://xmnls.com/foaf/0.1) - Vokabeln zur Modellierung von sozialen Netzen - foaf:person - eine Person - foaf:birthday - Geburtstag einer Person -... DATENORIENTIERTE SYSTEMANALYSE - 31-17. JUNI 2013
Serialisierung - Turtle Serialisierung allg: Graph schwer automatisiert verarbeitbar Einfaches und leicht lesbares Serialisierungsformat Syntax: - @prefix {identifier}: <{url}>. - {subj} {pred} {obj}. {subj} {pred} {obj 1 }[,...,{obj n }]. {subj} {pred 1 }{obj 1 }[;... ;{pred n } {obj n }]. - Ressourcen: ex:name, <http://name.org/res> - Literals: value - Vorteile: einfache Darstellung, Parser etc. verfügbar DATENORIENTIERTE SYSTEMANALYSE - 32-17. JUNI 2013
Serialisierung - Turtle 1 @prefix aw: <http:/bsp.at/x#>. 2 @prefix dc: <http://purl.org/dc/elements/1.1/#>. 3 @prefix foaf: <http://xmlns.com/foaf/1.1/>. 4 @prefix rdf: <http://.../22-rdf-syntax-ns#>. 6 aw:hans foaf:birthday "1935-01-10". 8 aw:rdfbook rdf:type aw:book; 9 dc:creator <http://wu.at/ anna>. 11 aw:albert rdf:type aw:person; 12 foaf:birthday "1980-08-12". DATENORIENTIERTE SYSTEMANALYSE - 33-17. JUNI 2013
Turtle Übungsbeispiel Source: www.semanticfocus.com DATENORIENTIERTE SYSTEMANALYSE - 34-17. JUNI 2013
Turtle Übungsbeispiel Convert graph to Turtle - Without use of namespace prefix Long version (with angle brackets) - With namespace prefix (Qualified names, QNames) (Use http://www.semanticfocus.com/ont/ as the sf namespace) Namespaces: : <http://wu.ac.at/ns/> dc: <http://purl.org/dc/elements/1.1/#>. DATENORIENTIERTE SYSTEMANALYSE - 35-17. JUNI 2013
Datentypen und Sprachangaben 35 Spezifizieren des Datentyps oder der Sprache von Literals Die XML-Schema Spezifikation enthält vordefinierte Typen (string, date; siehe http://www.w3.org/2001/xmlschema#) Definition eigener Typen möglich Angabe des Datentyps - RDF/XML: via rdf:datatype - Turtle/Graph : Value ˆˆ{datatype} Angabe der Sprache: - RDF/XML: via xml:lang - Turtle/Graph : Value @{lang} DATENORIENTIERTE SYSTEMANALYSE - 36-17. JUNI 2013
Datentypen und Sprachangaben 1 @prefix aw: <http:/bsp.at/x#>. 2 @prefix rdf: <http://.../22-rdf-syntax-ns#>. 3 @prefix foaf: <http://xmlns.com/foaf/1.1/>. 4 @prefix xsd: <http://www.w3.org/2001/xmlschema#>. 6 aw:staff rdf:type aw:people; 7 aw:member aw:bori. 9 aw:bori rdf:type aw:person; 10 aw:desc "Univ.Assistent"@de, 11 "Assistent Professor"@en; 12 foaf:birthday "1980-08-12"ˆˆxsd:date. DATENORIENTIERTE SYSTEMANALYSE - 37-17. JUNI 2013
Namespaces Zugriff auf Ressourcen 303 URIs Content-negotation: HTML (humans), RDF (machines) - 303 see other depending on content-negociation (Accept: header) - Get the given URL, needs 2 requests! - Good for large datasets (eg. DBpedia) - eg http://dbpedia.org/resource/berlin Hash URIs - With fragement identifier, eg. http://example.org/ voc#miketyson - Fewer requests, always whole document with all descriptions returned DATENORIENTIERTE SYSTEMANALYSE - 38-17. JUNI 2013
- Often used for vocabularies (small amount of resources) DATENORIENTIERTE SYSTEMANALYSE - 39-17. JUNI 2013
Übungsbeispiel 25 ca. 20min DATENORIENTIERTE SYSTEMANALYSE - 40-17. JUNI 2013
Fragen Fragen? DATENORIENTIERTE SYSTEMANALYSE - 41-17. JUNI 2013