Previous Entry Share Next Entry
RDF Toys and why I like them
photogeek
crschmidt
Toys are good fun. Over the past two weeks, I've been working on an rdfpython project: Building tools based on Redland and Python, including a simple web page and a rather complex IRC bot. Both of these tools are available via SVN.

RDF is one of a million TLAs that nobody ever understands or remembers, so this post is going to be dedicated to a short example of what RDF is and what it can do for me (although not necessarily for you).

RDF stands for Resource Description Framework and is a core component in the creation of the Semantic Web. That's the part that nobody cares about yet, but maybe after you read this post, you will.

There's a lot of information on the Internet. Most of it is trapped away inside documents that are hard for computers to understand and deal. Typically, computers are able to read the information, however, they don't understand the content: the content is merely redisplayed for the use of someone smarter: a person. As my Computer Science teacher once said, way back at St. Charles High School (before there was an East and a North): "Computers are fast, accurate morons. Humans are slow, inaccurate geniuses." [1] Computers can not read a text file and understand it: they just redisplay it for interpretation. As such, computers can not make any more advanced conclusions based on the information available. The Semantic Web is an effort to change that.

LiveJournal enhances the information available at a main journal page by using information in the header to direct tools to more information about the page. For example, in the header of my journal, the following content is included:

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://crschmidt.livejournal.com/data/rss" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="http://crschmidt.livejournal.com/data/atom" />
<link rel="meta" type="application/rdf+xml" title="FOAF" href="http://crschmidt.livejournal.com/data/foaf" />
<meta name="foaf:maker" content="foaf:mbox_sha1sum 'bbff51a6d70630daafe242c186a6e27fda3e99c7'" />

This says: "Here is some other information about the page. Namely a FOAF file, an RSS file, and an Atom file are attached to this page, which are of the type metadata, alternate data, and alternate data, respectively." A browser which understands this information might be able to offer you extra options on this page. For example, a window might pop up alongside your browser providing details about the person: Their name, their AIM IDs, their interests, and more. (There is a tool to do this for Firefox users: FOAFer, which creates a transparent display of FOAF information attached to a page. However, it has lots of problems, and I wouldn't recommend it unless you like playing with such things.)

Although this is useful, it is kind of pointless: Usually if you're reading a weblog, you can find out who created it easily enough. However, the FOAF file I previously mentioned contains quite a bit of information which can be useful in the context of more than just a sidebar: it serves as a set of contact information that a computer can understand. Previously, I mentioned an Redland based bot that I'm working on. The main use of this bot is to aggregate information about people that the computer can understand, and allow them to ask it questions based on it.

In addition to my LiveJournal FOAF file, I have an additional file that describes me at http://crschmidt.net/foaf.rdf. (There is a human-readable version of this page.) In this file, I describe my location as a set of GPS coordinates. Once I have done this, I can ask my favorite bot where I live:

20:56:39 < crschmidt> ^icbm crschmidt
20:56:45 <+julie> 42.9813 -71.4369

Simply open a mapping utility, and you can find all kinds of things near me, from Geocaches to maps on how to get there.

Ever wanted to find a bar, but couldn't remember the address? Just describe it in a language that a computer can understand, and you can ask the bot:

21:00:59 < crschmidt> ^pub-address Cuths Bar
21:01:00 <+julie> Durham United Kingdom 12 South Bailey DH1 3EE ,

A lot of the semantic web seems like hype - sure, this is great, but what can it do for me now? By creating this tool, I feel that I have created something that people can actually use in small doses as a source of information. Need the AIM name for someone, but only have their nickname? How about an email address?

21:04:41 < crschmidt> ^mbox crschmidt
21:04:46 <+julie> [mailto:crschmid@uiuc.edu]

This information is easy to describe -- and the larger the dataset gets, the more understanding computers can have of the information on the world wide web. It's not artificial intelligence - nor do I claim it is. It's merely making it more simple for computers to understand how to answer the questions you ask. And to me, that's pretty darn cool.

[1] This quote is from Mr. Reber, and was told to me approximately 4 years ago. Googling to ensure that the quote is actually original returned only one result: a paper by another student of the same teacher. Apparently the quote is actually original, something I was never quite convinced of in the past.

  • 1
Really enjoyed this post - and it's the first good example that I've seen that's hammered into my thick skull the real value of the semantic web. Finally I can dispel the buzzword haze!

In fact, your description of your "favorite bot" sounds like the future I see for man-machine interaction. Could you tell me a little more about this bot that you use (on irc? or a web service?), or point me to a starting point for more information?

BTW, I came across your blog while searching for good ways to integrate wordpress and lj, and was mightly impressed by your account of your hacking of the lj backup script.

I'm just getting up to speed with RDF, Pingback & Trackback, so I really found your articles useful.

I'm still searching for a good way to use lj & wordpress as two equivalent viewers for the same content (posts & comments). Obviously, LiveJournal is valuable for it's community.

Hope you don't mind me adding you as a friend so I can keep track of your postings.

Keep hacking your heart out!

There isn't really a starting point for information, but it's an IRC bot - available on irc.freenode.net in #julie.

If you ask for ^info from the bot, this is what she'll tell you:

20:27:45 < julie> I'm a Redland/Python based RDF query bot. Source in SVN at <http://crschmidt.net/svn/rdfpython/trunk/>. Commands are ^add <url>, which adds statements, ^newcommand <name> is <RDQL Query>, ^runcommand <commandname> <arguments> . ^commandlist lists current commands, ^commandlist <command> shows info on a command, ^part will have me part a channel, ^join <#chan> will have me join a channel. Talk to crschmidt for more.

I'm working on an AIM interface, but having problems because the Redland Perl stuff is broken for me for some reason.

If you can't get on IRC easily, let me know, and I'll hook you up with some access. #julie is best place to get my attention (just shout crschmidt, and I'll come running).

There's actually a more impressive LJ importing script now, although I haven't looked into it recently - my wordpress hacking and so on has fallen by the wayside with paid work. (Although right now paid work includes setting up a wordpress blog for a client, so maybe that will change.)

I don't have any advice to you on how to make them the same in terms of content. I use wordpress mostly for the extras for myself: Archive searching, categories, etc.

Feel free to add me. I may eventually add you back - I'm actually kind of low on interesting things to read lately.

Thanks for the encouragement! Again, if you can't get on IRC, lemme know, and I'll help you out.

Thanks! I can get on IRC no problem, it's just that I don't usually. Plus, my timezone is GMT+8, so there's a very small window when we'll both be awake and online.

Then again, I keep wierd hours, and while I'd guess you normally would, you've now got kids. :)

Of course, julie'll be there for me 24x7 right?

Yes, the new LJ-wordpress plugin is great, and the only thing left is getting LJ comments into the wordpress system in realtime. I can already get old LJ entries into WP with comments.

It sucks how paid work really cuts into the time you have to do cool stuff, though it sounds like you do a fair bit of cool stuff at work. Lucky you.

Add me or remove me as you please - I'm not fussed. I don't write all that often, and when I do it's mostly banal.

I'd been wondering what that FOAF thing was in "PPersonal Info." Thanks for clearing up a bit of the mystery. It sounds pretty interesting - I might have to look into it more! ;)

Quite enlightening! Thanks for the info... and you were right: what won't I use it for?

  • 1
?

Log in

No account? Create an account