SparQL is Wicked Sick G

February 16, 2006 by slholmes · Comment
Filed under: General 

I have begun to really use Protege-OWL. If you’ve never heard of this application, definitely check it out. It’s where the semantic web begins really. Protege is a very mature knowledge aquisition and management system that was developed as part of a large bioinformatics project. It spun off to become it’s own project at Stanford an it has huge userbase. The Web Ontology Language (OWL) was designed by the folks at the World Wide Web Consortium (W3C). OWL is an XML dialect designed to describe things. Protege-OWL is an extremely interactive editor for creating OWL documents. OWL is one of the main languages of the Semantic Web. The Semantic Web is an architecture designed to get data to link together in a way that documents link together on the regular web. The difference is that the data is linked together in a way that will let other computer programs understand somewhat what the data actually means (a stepping stone to artificial intelligence).

Once I started putting things together in OWL, my skills as a database application designer started kicking in and I immediatedly wanted to get information out of OWL. This seemed to be a bit daunting. My first inclination was to learn a goodly amount of XSTL but it got kind of hairy. Some of the pain was alleviated by learning about the OWL XML Presentation Syntax (a W3C suggested syntax) and by using a little program called owlrdf2owlxml which is part of the excellent Kaon2 OWL Tools. OWL XML makes the OWL files almost readable. And owlrdf2owlxml gets the OWL file into a shape that is very easy to use XSLT with.

All the while I was doing this work, though, I kept thinking in the back of my mind that there was a query language for OWL.

One day at work, I found myself opening Microsoft Notepad one more time, writting some notes (again), saving that text file to my desktop, yet again for the umpteenth time and I thought “this is wack”. From now on, the first thing I’m going in the morning is to open up Protege and start putting notes and stuff in that. Then I could link things together and maybe get a little bit more organized.

And that’s exactly what I did.

Things just started to happen. I created a class called Person and tacked on a bunch of properties for phone numbers, email addresses and other notes and stuff. After a few days of doing this, I had a really cool little knowledgebase and I was actually capturing some important information and Protege was actually saving me time from looking through emails, spreadsheets, Word documents and text documents. Well, I just had to figure out how to query my little knowledge base to get even more information out of it. Desparately, I started to learn SparQL.

What a weird freaking little language. Here’s a sample of some SparQL I wrote (Using the Protege-OWL SparQL enabled beta).

SELECT ?PCN ?ProfitCenter ?ContractType ?FSAVersion ?Director ?Phone ?EmailWHERE { ?District :hasProfitCenters ?PC . ?District rdfs:label ?DM . ?PC rdfs:label ?ProfitCenter . ?PC :hasDirector ?CDirector . ?PC :hasPCNumber ?PCN . ?PC :hasFSAContractType ?CT . ?PC :hasFSAVersion ?FSAV . ?CT rdfs:label ?ContractType . ?FSAV rdfs:label ?FSAVersion . ?CDirector rdfs:label ?Director . ?CDirector :hasOfficePhone ?Phone . ?CDirector :hasEmailAddress ?Email FILTER ?DM='Some Guy'}

I’ll probably look back at this query some day in the future and laugh and think, that’s the worst query every written. But there you go. Gives me a nice pretty listing of all of the phone numbers, emails and stuff of the directors at some profit centers I have to worry about sometimes.

There it is. My first piece on real world usage of OWL and stuff. Not much, huh? But it’s a start. After a while, you have to put away the endless PDFs and books and stuff and just play with this stuff. It took me a really long time to get to this point. I’m happy. I’m hoping some other folks out there can appreciate this.

I’m not foolin’ around. This stuff is like buildings the pyramids.

w.bloggar for bloggin offline

February 16, 2006 by slholmes · Comment
Filed under: General 
One of the biggest pains in the neck has always been my desire to work offline.

I spend quite allot of time on the train (two+ hours every day). I’m almost always working on my laptop. I read everything almost exclusively on the laptop, news weather, blogs, specifications, user manuals. all kinds of things. and most of it is a local copy so I don’t have to deal with the cell phone. Blogging has always been one of those things I’d planned on setting up myself but never had any time. So recently, I’d been clicking the little powered by buttons on some of the better blogs I read. That’s how I landed here at SquareSpace.

Now once I got the blog site figured out, I got some advice from the support team and started looking for a blogging client. After a few attempts, I found w.bloggar. w.bloggar is an HTML editor with support for a wide variety of bloggers. Several searches for a free blogging client came up empty or didn’t support SquareSpace (at least as far as I could tell). w.bloggar appears to be a Visual Basic program but does not appear to be open source. There’s not been much in way of releases but it appears to be a solid program and enough to do all the basics. When I clip on the help tool or the help menu item, nothing happens. There does not appear to be a manual.

I “Get” the Semantic Web

February 15, 2006 by slholmes · Comment
Filed under: General 
Some times it just takes a while for me to get something. A while back, I’d installed Sesame which is a triple store. After I was done installing, I tested Sesame out by uploading an RDF file and ran some queries. Using the MySQL administrator, I went in and examined the data - everything was working. I had a database and a bunch of RDF stored in a table. Later, that morning, I uploaded another file. Then I got to thinking. How do I tell the difference between the two sets of RDF I’d uploaded that day - as they were going to the same database.

And I thought “oh. that’s right. It’s not going to matter because all the classes and properties are different”.

And I didn’t think anything more about it until today. This was a couple of days after reading an interview with Tim Berners-Lee about the semantic web. Then I watched a video. Then all at once, it dawned on me. “Dude!”, I thought, “it’s all like that!” all of the RDF can be merged no problem. It all fits together. It’s all just a giant, distributed list of tripples: subjects, predicates and object as far as the mind can see.

here’s a test of the w.bloggar 4.0.

How do we tell Squarespace.com and w.bloggar to maintain the white space in a post?