. Multi-agent Systems: . . . .1 Intro to . RDFa . . . .

Michael Rovatsos .2. RDFa School of Informatics .

21 February 2011

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 1 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 2 / 22 Review Semantic Markup Embedded in HTML, 1

Existing document web is firmly established — can we use this base to support semantic applications? General idea: embed semantic markup into existing (X)HTML tags. RDF(S) implements part of the vision of the SemWeb: . Obtaining network effect for SemWeb requires overcoming the ’Semantic Example: hCard . . . markup bottleneck’. .0131 650-1234 . Promising approaches: . . . . I Using NLP to convert unstructured information into RDF(S) Example: RDFa . . . I Microformats / RDFa for embedding RDF into web documents .0131 650-1234 I Exporting from RDBs to RDF stores. . . . . Perspective 1: This is a regular web page, but hey, we can get semantics out of it. Perspective 2: This is machine-readable data, but hey, humans can browse it just like the Good Old Document Web.

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 3 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 4 / 22 Semantic Markup Embedded in HTML, 2 Semantic Markup Embedded in HTML, 3

What about HTML’s META tag? . META in Informatics Web Page . . . Approach is best-suited to information which fits into familiar and frequently used categories, e.g., contact information, calendar events, -location information, product reviews, social network information. . . Why do we need more than existing HTML tags? . . . But: I In fact, has been explored: cf. “screen scraping”, “wrapper induction” I But traditional HTML tags primarily oriented towards visual rendering. META information is invisible to humans Tends to fall out of synchronization with visible content Has been abused by people concerned with SEO (and therefore can actually harm your Google rank).

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 5 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 6 / 22 Microformats, 3 RDFa

Microformats = Semantic Web for the Impatient ? RDFa can be seen as a new way of serializing RDF. But so far, efforts to infuse the Web with meaning have gained little traction. These initiatives have been bogged down by complexity and over-ambitious RDFa = RDF_in_attributes goals, or have simply been too much trouble to implement at a large scale. Integrates into XHTML, but simpler than RDF/XML. Motivation is similar to microformats, but

Proponents of microformats subscribe to general idea of “web of data”, I more generic; but unconvinced by RDF, OWL, etc. I can benefit from many existing tools for processing RDF. Microformats intended to lower “barrier to entry” — no need to learn a Two basic cases, corresponding to whether object is literal or resource. new language. Try to use visible data rather than invisible . subject predicate object Try to re-use existing standards / vocabularies for data modelling; e.g., literal as object about property PCDATA or content vCard, iCalendar hCard, hCalendar. URI as object about rel href ⇒

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 7 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 8 / 22 RDFa = RDF + XHTML, Case 1 RDFa = RDF + XHTML, Case 1

isbn:51649-9 RDF triple dc:title NLP with Python

text: text: element: div object (literal) element: div NLP with Python XML node tree NLP with Python attribute:class attribute: class title title attribute:about subject isbn:51649-9 XML node tree text: element: div NLP with Python + RDFa attribute:property attribute: class dc:title predicate title

attribute: about isbn:51649-9

attribute: property dc:title

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 9 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 10 / 22 RDFa, Case 1 RDFa = RDF + XHTML, Case 2

isbn:51649-9 orm:ewan_klein RDF triple dc:creator . RDF triple . . . isbn:51649-9 dc:title "NLP with Python" . . text: . element: div . . . XML node tree Ewan Klein . XHTML . . . attribute: class

author NLP with Python XML node tree text: element: div .
Ewan Klein . . . . + RDFa . attribute: class XHTML with RDFa . author . . attribute: about
isbn:51649-9 NLP with Python attribute:rel .
dc:creator . . . . attribute: href orm:ewan_klein

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 11 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 12 / 22 RDFa = RDF + XHTML, Case 2 RDFa, Case 2

. RDF triple . . . .isbn:51649-9 dc:author orm:ewan_klein . text: . element: div Ewan Klein . . . . attribute: class XHTML . . . author

attribute: about isbn:51649-9 Ewan Klein isbn:51649-9 .
. . . . attribute:rel . dc:creator dc:creator XHTML with RDFa . . .
Ewan Klein
. . . . .

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 13 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 14 / 22 Cafe Web Page Cafe Web Page, 1

. File Metadata, 1 . . .

. . . . Invisible in this case, so vulnerable to previous criticism. Empty value of about refers to current document by default.

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 15 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 16 / 22 Cafe Web Page, 2 Cafe Web Page, 3

. Image Metadata . . . . File Metadata, 2 . . .

All content on this site is licensed under href="http://creativecommons.org/licenses/by/3.0/"> a Creative Commons License . ......
. . . . Object of the subject relation expressed via a literal. But no suitable PCDATA (i.e., text) daughter, so use value of content RDFa slots easily into an a element; attribute instead. other examples of SPO with URI object extrapolate from this. All spans that are subordinate to the img element share their parent’s specification for about.

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 17 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 18 / 22 Cafe Web Page, 4 Cafe Web Page, 4

. Table Row, 1 . . . . Table Row, 2 . . . typeof="gr:BusinessEntity" ... rel="rdfs:seeAlso" href="http://www.artisanroast.co.uk/"> ... Artisan Roast . . . . . Makes the whole row map to a subject of type v:Review. ... This is a vocabulary promoted by Google (cf. link on MASWS page . . . . . for RDFa) Uses GoodRelations (gr prefix) ontology We have to repeat the URI of Artisan Roast to provide object for Special syntax for rdf:type. v:itemreviewed.

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 19 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 20 / 22 Cafe Web Page, 5 Cafe Web Page, 6

. Table Row, 2 . . . ... . Extracted RDF . . . Broughton Street <:aroast> a gr:BusinessEntity ; v:address "Broughton Street" ; ***** rdfs:seeAlso . ... [ a v:Review ; . v:itemreviewed <:aroast> ; . . . . v:rating "5" ; Hierarchical structure of the table row doesn’t mesh nicely with the fact . v:summary "Best coffee ..."]. . that we have two subjects: . . .

I the review I the business We use content attribute to normalize the rating literal.

Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 21 / 22 Michael Rovatsos (School of Informatics) Multi-agent Semantic Web Systems:RDFa 21 February 2011 22 / 22