N3 as a logic language 2005-03-21


After yesterday's entry Understanding the Semantic Web: N3 to the rescue I went on to spend some time actually starting to write a N3 parser. The language is straightforward enough, though the BNF grammar was a bit awkward.

That might be because it was actually generated from an N3 description of N3 itself. I ended up reading the N3 description instead of the BNF, and got most of the way to having a working language checker (as in, it parses most of the language but throws away the result) in a couple of hours, and plan to fill it in to create a proper parser later this week.

N3 seems promising to me both as a way of exploring RDF and OWL and as a data format in it's own right.

I'll want to implement a basic RDF storage model as well, but that seems quite straightforward (I'm looking at a testing ground, not production quality code)

I was looking at Redland yesterday too, and while I'm sure it's a fine system, it just seems far too complex for my taste.

N3 really drove home the idea that what RDF-S and OWL and the rest is really about is simple logic programming based around Horn clauses. It's a very constrained, and simple model, which is good because apart from some toying with Prolog when I was a kid I haven't spent much time on it - this is a great opportunity to read up now that I have real world applications for it.


blog comments powered by Disqus