Advanced Knowledge Technologies
Transcrição
Advanced Knowledge Technologies
Advanced Knowledge Technologies Applications Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 2 Prof. Dr. Ulrich Reimer © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 3 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 4 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 5 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 6 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 7 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 8 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 9 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 10 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 11 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 12 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 13 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 14 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 15 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 16 Semantic Search Architecture Information Retrieval NLP Q Sparql Q NLP Instances RDFa HTML Pages Holger Wache 17 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 18 Microformats ■ Microformats are small patterns of (X)HTML to represent commonly published things like people, events, blog posts, reviews and tags in web pages. ■ We all know that (X)HTML is for structure & semantics, not style. ■ Semantics are meaning. ■ Adding standard classes to an (X)HTML document we can augment the semantics and store further information. Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 19 How are they consumed? ■ Microformats are currently consumed in several ways (not a comprehensive list): ♦ By web users ♦ By spiders ♦ By web services Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 20 Web Users ■ Web users consume Microformats info through specialty tools such as the Firefox Operate extension. This extension allows users to: ♦ Add hCard & hCalendar info to Outlook. ♦ Add hCard & hCalendar info to Yahoo & Google ♦ Find Microformat addresses on Google Maps Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 21 Web Spiders ■ Web spider or web crawlers already pick up useful information such as email addresses. ■ Now look for spiders to pick up hCard, vCard and other Microformat information which they will compile for use with Web Services. Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 22 Web Services ■ Web services are applications that collect and process information then distribute that information to end users. ■ Examples: ♦ Stock quotes ♦ Events collection ♦ Contact info collection Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 23 Two popular Microformats ■ hCard: is an HTML vCard which contains contact information. ■ hCalendar: capable of storing event information. Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 24 hCard Uses the following classes (to name a few): ■ vcard: this is the root class ■ url: a web address ■ fn: first name ■ org: organization ■ adr: an address wrapper with the following: ♦ street-address: street # and name ♦ locality: city ♦ region: state ♦ postal-code: zip ■ tel: telephone # Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 25 hCard Example Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 26 hCard Example Code (1) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 27 hCard Example Code (2) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 28 hCard Example Code (3) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 29 hCard Example Code (4) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 30 hCard Example Code (5) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 31 hCard Example Code (6) ■ Next, you can create the CSS classes: Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 32 hCalendar Uses the following classes (to name a few): ■ vevent: this is the root class ■ dtstart & dtend: event start & end times ■ summary: the name of the event ■ location: the location of the event ■ description: event details Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 33 hCalendar Example Code (1) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 34 hCalendar Example Code (2) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 35 hCalendar Example Code (3) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 36 hCalendar Example Code (4) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 37 hCalendar Example Code (5) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 38 hCalendar Example Code (6) Holger Wache (c) http://seanpatrickgriffin.com/NorthLake/Spring2009/PageDesignTwo/Tutorials/010Microformats/ppt/Microformats.ppt / [24.05.2010] 39 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 40 Status ■ W3C recommendation since October 14, 2008: http://www.w3.org/TR/rdfa-syntax/ ■ First proposed in 2004 Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 41 A normal HTML page … Joe Semantic's personal information I work as a programmer at MegaCorp - you can contact me at [email protected], or by phone at (101) 0101010. Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 42 HTML source <html> <head> <title>Joe Programmer's contact info</title> <base href="http://joeprogrammer.com/contact-info.html" /> </head> <body> <h1>Joe Semantic's personal information</h1> <p>I work as a programmer at <a href="http://megacorp.com">MegaCorp</a> you can contact me at <a href="mailto:[email protected]">[email protected]</a>, or by phone at (101)010-1010.</p> </body> </html> Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 43 RDF / XML <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#"> <rdf:Description rdf:about="http://joesemantic.com/contact-info.html"> <contact:title xml:lang="en">programmer</contact:title> <contact:org rdf:resource="http://megacorp.com"/> <contact:email rdf:resource="[email protected]"/> <contact:tel xml:lang="en">(101) 010-1010</contact:tel> </rdf:Description> </rdf:RDF> Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 44 RDF/A: Combining RDF and XHTML <html xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#"> <head> <title>Joe Semantic's personal information</title> <base href="http://joesemantic.com/contact-info.html" /> </head> <body> <h1>Joe Semantic's personal information</h1> <p>I work as a <span property=”contact:title”>programmer</span> at <a rel="contact:org“ href="http://megacorp.com">MegaCorp</a> - you can contact me at <a rel="contact:email“ href="mailto:[email protected]"> [email protected]</a>, or by phone at <span property=”contact:tel”>(101)010-1010</span>. </p> </body> </html> Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 45 Three main keywords in RDFa ■ <a rel=”predicate” href=”object”>...</a> ...defines a linked triple ■ <span property=”predicate”>object</span> ...defines an unlinked triple (literal) ■ <span about=”subject”>...</span> ...creates a subject for triples Holger Wache (c) http://www.techpresentations.org/Why_RDFa? [24.05.2010] 46 Example: rel ... All content on this site is licensed under <a rel="license" href="http://creativecommons.org/licenses/by/3.0/"> a Creative Commons License </a>. Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 47 Example: rel ... All content on this site is licensed under <a rel="license" href="http://creativecommons.org/licenses/by/3.0/"> a Creative Commons License </a>. Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 48 Example: property <div xmlns:dc="http://purl.org/dc/elements/1.1/"> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ... </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 49 Example: property <div xmlns:dc="http://purl.org/dc/elements/1.1/"> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ... </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 50 Example: about <div xmlns:dc="http://purl.org/dc/elements/1.1/"> <div about="/alice/posts/trouble_with_bob"> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ... </div> <div about="/alice/posts/jos_barbecue"> <h2 property="dc:title">Jo's Barbecue</h2> <h3 property="dc:creator">Eve</h3> ... </div> ... </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 51 Example: about <div xmlns:dc="http://purl.org/dc/elements/1.1/"> <div about="/alice/posts/trouble_with_bob"> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ... </div> <div about="/alice/posts/jos_barbecue"> <h2 property="dc:title">Jo's Barbecue</h2> <h3 property="dc:creator">Eve</h3> ... </div> ... </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 52 Example: about (2) <div about="/alice/posts/trouble_with_bob"> <h2 property="dc:title">The trouble with Bob</h2> The trouble with Bob is that he takes much better photos than I do: <div about="http://example.com/bob/photos/sunset.jpg"> <img src="http://example.com/bob/photos/sunset.jpg" /> <span property="dc:title">Beautiful Sunset</span> by <span property="dc:creator">Bob</span>. </div> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 53 Example: about (2) <div about="/alice/posts/trouble_with_bob"> <h2 property="dc:title">The trouble with Bob</h2> The trouble with Bob is that he takes much better photos than I do: <div about="http://example.com/bob/photos/sunset.jpg"> <img src="http://example.com/bob/photos/sunset.jpg" /> <span property="dc:title">Beautiful Sunset</span> by <span property="dc:creator">Bob</span>. </div> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 54 Example: about (3) ... I'm currently reading <span about=”urn:ISBN:0-596-00027-8”> <span property="dc:title">Programming Perl</span> by <span property="dc:creator">Larry Wall</span> </span>. ... Holger Wache 55 Example: typeof <div typeof="foaf:Person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name"> Alice Birpemswick </p> <p> Email: <a rel="foaf:mbox“ href="mailto:[email protected]">[email protected]</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+1-617-5557332">+1 617.555.7332</a> </p> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 56 Example: typeof <div typeof="foaf:Person" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <p property="foaf:name"> Alice Birpemswick </p> <p> Email: <a rel="foaf:mbox“ href="mailto:[email protected]">[email protected]</a></p> <p> Phone: <a rel="foaf:phone" href="tel:+1-617-5557332">+1 617.555.7332</a> </p> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 57 Example: friend-of-a-friend (FOAF) <div xmlns:foaf="http://xmlns.com/foaf/0.1/" about="#me" rel="foaf:knows"> <ul> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/bob">Bob</a> </li> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/eve">Eve</a> </li> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/manu">Manu</a> </li> </ul> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 58 Example: friend-of-a-friend (FOAF) <div xmlns:foaf="http://xmlns.com/foaf/0.1/" about="#me" rel="foaf:knows"> <ul> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/bob">Bob</a> </li> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/eve">Eve</a> </li> <li typeof="foaf:Person"> <a property="foaf:name" rel="foaf:homepage" href="http://example.com/manu">Manu</a> </li> </ul> </div> Holger Wache (c) http://www.w3.org/TR/xhtml-rdfa-primer/ [24.05.2010] 59 Top 10 Web Applications http://www.readwriteweb.com/archives/top_10_semantic_web_products_of_2010p2.php Holger Wache 60 Welcome on Board, Google, Bing and Yahoo! http://www.schema.org http://googleblog.blogspot.com/2011/06/introducing-schemaorg-search-engines.html [accessed 03.06.2011] Holger Wache 61 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 62 Motivating Example List of countries by GDP (nominal) on Wikipedia Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 63 Motivating Example ■ What if we also want ♦ List of Asian countries by GDP (nominal) ♦ List of developed countries by GDP (nominal) ♦ List of countries that has a female head of state by GDP (nominal) ■ A lot of repetition of data ■ Potential data inconsistency Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 64 SMW is Media Wiki + a little bit semantics (subset of RDFS) Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 65 SMW: a Application Workbench Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 66 SMW Layer Cake HaloACL SPARQL endpoint ... … Semantic Forms Parser Functions Semantic Drilldown Variables Semantic Maps Loop Functions Semantic Template Halo ... … Semantic MediaWiki (SMW) String Functions External Data …… MediaWiki (MW) Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 67 Semantic Annotation & Search ■ Demo: http://wiki.wirtschaft.fhnw.ch/iwiki/index.php/IWIki Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 68 Semantic Annotation Comparison to RDF RDF SMW Class Category pages (e.g. Category:Course) Property Property pages (e.g., Property:participant) Instance “normal” pages (e.g., Tim Berners-Lee) A rdfs:subclassOf B [[Category:B]] on page “Category:A” A rdfs:subPropertyOf B [[Subproperty of::Property:B]] on page “Property:A” Plenty of expressivity extensions for SMW: rules, OWL meta-model, etc. Holger Wache (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 69 SMW-based Application: Show Cases 1/13/2010 Holger Wache Linked Data Workshop, MIT (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 70 70 1/13/2010 http://www.aifb.kit.edu/ Holger Wache Linked Data Workshop, MIT (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 71 71 1/13/2010 http://www.metacafe.com/ Holger Wache Linked Data Workshop, MIT (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 72 72 1/13/2010 http://taaable.fr/ Holger Wache Linked Data Workshop, MIT (c) www.cs.rpi.edu/~baojie/pub/2010-01-10_Linkeddata.ppt [24.05.2010] 73 73 More Resources ■ Semantic-mediawiki.org ■ ASWC 2009 Tutorial: Semantic MediaWiki and Applications http://aswc-smw-tutorial.referata.com/ ■ Semantic Wiki mini-series on Ontolog: http://ontolog.cim3.net/cgi-bin/wiki.pl?SemanticWiki ■ New progress (monthly): http://smwforum.ontoprise.com/smwforum/index.php/Category:SMW_Discussions ■ Referata.com (hosting) ■ SMWforum (smwforum.ontoprise.com) ■ SMW Camp: http://smwforum.ontoprise.com/smwforum/index.php/SMW_Camp_09 1/13/2010 Holger Wache Linked Data Workshop, MIT 74 74 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 75 Prof. Dr. Ulrich Reimer © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 76 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 77 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 78 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 79 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 80 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 81 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 82 © Prof. Dr. Ulrich Reimer, FHSG Holger Wache 83 http://semanticweb.com/monster-offers-more-semantic-enabled-help-to-job-seekers-and-hr-staffers_b19673 Holger Wache 84 Agenda ■ Application: Content-based Retrieval ■ Architecture ■ Annotating Web Sites ♦ Microformats ♦ RDFa ■ Application: Semantic Wiki ■ Application: Job search ■ Further Applications Holger Wache 85 Case Studies Semantic Technology Conference 2011 http://semtech2011.semanticweb.com/programDetails.cfm?ptype=T&optionID=117&pgid=35 [07.05.2011] Holger Wache 86 Top 10 Semantic Web Products of 2010 (see history) http://www.readwriteweb.com/archives/top_10_semantic_web_products_of_2010.php [07.05.2011] Holger Wache 87 http://www.readwriteweb.com/archives/top_10_semantic_web_products_of_2010.php [07.05.2011] Holger Wache 88 http://www.readwriteweb.com/archives/top_10_semantic_web_products_of_2010.php [07.05.2011] Holger Wache 89 Semantic Web Challenge http://challenge.semanticweb.org/ [07.05.2011] Holger Wache 90 Google and Metadata … http://maps.google.ch/maps/place?hl=de&biw=1920&bih=871&um=1&ie=UTF-8&q=Z%C3%BCrich+Grossm%C3%BCnster& fb=1&gl=ch&hq=Grossm%C3%BCnster&hnear=Z%C3%BCrich&cid=5267563484481281808 Holger Wache 91