Semantic Web

The semantic web enables software to understand data on the web (http://www.w3.org/2001/sw/SW-FAQ). This week I have been looking into ways that semantic data can be added to the application in a standards compliant way.

The first port of call is FOAF where I found that it supports images through the Image element. Images can be said to depict something which essentially allows us to say “This image contains Jonny and Deep” but does not allow us to be more specific about which part of the image is which person, etc.

This more granular control is offered by pairing FOAF with Dublin Core, specifically the hasPart property.

An example of this is:
<foaf:Image rdf:about="http://example.com/test.jpg">
<img:height>480</img:height>
<img:width>640</img:width>
<img:area>307200</img:area>
<img:hasPart>
<img:Polygon>
<img:polypath>M1 141 L1 141L14 127 L24 127 L28 119 L28 99 L36 69 L59 38 L76 34 L101
40 L113 54 L133 105 L121 129 L122 139 L137 146 L152 166 L169 204 L185 229 L212 273
L229 294 L243 306 L263 315 L264 329 L253 333 L213 327 L204 311 L185 287 L127 201
L128 215 L125 230 L118 238 L112 250 L112 262 L113 270 L124 271 L133 284 L136 302
L132 349 L134 365 L140 428 L134 436 L117 439 L108 446 L102 480 L37 480 L16 449 L7
434 L3 420 L1 141 z</img:polypath>
<img:area>57442</img:area>
<svgr:InPosition>W</svgr:InPosition>
<img:fraction>0.187</img:fraction>
<foaf:regionDepicts>
<foaf:Person>
<foaf:name>Jonathan Scott</foaf:name>
<foaf:mbox_sha1sum>0f4a7e36214bb4e06a570d6aec8a131695aeb0e0</foaf:mbox_sha1sum>
</foaf:Person>
</foaf:regionDepicts>
</img:Polygon>
</img:hasPart>

This could be published at a url for example http://jscott.me/taggr/http.example.com.test.jpg.rdf# which could then be crawled to automatically populate a remote tagging application. I expect this will be implemented to some extent in the prototype before it is completed.

This entry was posted in Technical Problems and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *