Continued elsewhere

I've decided to abandon this blog in favor of a newer, more experimental hypertext form of writing. Come over and see the new place.
Showing posts with label owl. Show all posts
Showing posts with label owl. Show all posts

Saturday, September 09, 2006

Prolixity of RDF vs Lisp

I'm messing with OWL/RDF and other semantic web goodness. Here is how you define an enumerated lists of strings (that can be the value of some property:

<code>
<owl:oneof parsetype="Resource">
<rdf:rest parsetype="Resource">
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVATION</rdf:first>
<rdf:rest parsetype="Resource">
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-ALLOSTERIC</rdf:first>
<rdf:rest parsetype="Resource">
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-COMPETITIVE</rdf:first>
<rdf:rest parsetype="Resource">
<rdf:rest parsetype="Resource">
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-NONCOMPETITIVE</rdf:first>
<rdf:rest parsetype="Resource">
<rdf:rest parsetype="Resource">
<rdf:rest parsetype="Resource">
<rdf:rest parsetype="Resource">
<rdf:rest resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil">
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVATION-ALLOSTERIC</rdf:first>
</rdf:rest>
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVATION-NONALLOSTERIC</rdf:first>
</rdf:rest>
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-UNCOMPETITIVE</rdf:first>
</rdf:rest>
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-OTHER</rdf:first>
</rdf:rest>
</rdf:rest>
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION-IRREVERSIBLE</rdf:first>
</rdf:rest>
</rdf:rest>
</rdf:rest>
</rdf:rest>
<rdf:first datatype="http://www.w3.org/2001/XMLSchema#string">INHIBITION</rdf:first>
</rdf:rest></owl:oneof>
</code>

That's 1853 characters, to do something that is obviously derived from Lisp and which in Lispy syntax can be done like this:


(oneof
"ACTIVATION"
"INHIBITION-ALLOSTERIC"
"INHIBITION-COMPETITIVE"
"INHIBITION-NONCOMPETITIVE"
"ACTIVATION-ALLOSTERIC"
"ACTIVATION-NONALLOSTERIC"
"INHIBITION-UNCOMPETITIVE"
"INHIBITION-OTHER"
"INHIBITION-IRREVERSIBLE"
"INHIBITION")

Or 244 characters. The OWL format is 7.6 times the size, and this is a relatively simple example.

Of course the RDF format is grossly inefficient in terms of space and bandwidth, but my real problem with it is that it is also vastly inferior in terms of human comprehensibility.

One of Lisp's real strength is in human interface -- its external representations are simple and direct representations of its internal structures. This is what makes hacking Lisp fun, and powerful. As some Lisp guru once said, "you can feel the bits between your toes", but it's not the bits, its the actual conceptual data structures that have an almost tangible existence in a Lispy environment.

Pretty much nothing since Lisp has retained this quality. Modern IDEs do a lot to make code more tangible, but are pretty primitive when it comes to data. And XML/RDF is only barely human-readable, and not at all human-typable at any scale.

Friday, March 17, 2006

Math is hard!

I was complaining before about semantic web stuff being heavyweight? Here's a section from the SPARQL (RDF query language) specification:

2.5 Basic Graph Patterns

A basic graph patterns is a set of triple patterns and forms the basis of SPARQL query matching. Matching a basic graph pattern is defined in terms of generic entailment to allow for future extension of the language.

Definition: Basic Graph Pattern

A Basic Graph Pattern is a set of Triple Patterns.

Definition: E-entailment Regime

An E-entailment regime is a binary relation between subsets of RDF graphs.

A graph in the range of an E-entailment is called well-formed for the E-entailment.

This specification covers only simple entailment [RDF-MT] as E-entailment. Examples of other E-entailment regimes are RDF entailment [RDF-MT], RDFS entailment [RDF-MT], OWL entailment [OWL-Semantics].

Definition: Basic Graph Pattern equivalence

Two basic graph patterns are equivalent if there is a bijection M between the terms of the triple patterns that maps blank nodes to blank nodes and maps variables, literals and IRIs to themselves, such that a triple ( s, p, o ) is in the first pattern if and only if the triple ( M(s), M(p) M(o) ) is in the second.

This definition extends that for RDF graph-equivalence to basic graph patterns by preserving variables names across equivalent graphs

Now, this is not all that abstruse, but then I have a math degree and am used to it. Way back then I studied mathematical logic, thought it was fun but a lousy way to describe the world and a lousy model for computation. It seems to have triumphed, however, and now people are expected to speak that language (the RDF semantics spec is even worse). I have a hard time believing that working programmers (a set of which I myself am a member of, nowadays) are going to be gleefully soaking up all the model-theoretic semantic theory behind the semantic web.

Maybe I'm wrong, there are people willing to boil things down into understandability. This well-written article doesn't cover any sort of non-trivial queries however.

There seems to be a big gap between RDF-as-first-order-predicate-logic-with-model-theoretic-semantics and RDF-as-useful-flexible-emerging-data-standard. Looked at positively, it's a two-pronged thrust, from academia and hackerdom acting together.

Tuesday, March 14, 2006

Semantic Con

I don't really mean the pun in the title; the Semantic Technologies conference was actually pretty interesting, in a hypeish sort of way. It represnts the attempt to diffuse a set of academic technologies and standards into industry. Note that while the standards (RDF, OWL, etc) are promoted and developed under the rubric "Semantic Web", the web is notably absent from the conference title. That's because these technologies are not being taken up so much in by the web proper, but are being sold to huge organizations with massive and complex data integration needs. These include defense (aero), intelligence, finance, and biotech. At the grassroots, it is being pushed by working life scientists trying to solve the same sorts of problems. Here's a presentation by Carole Goble that summarizes the hype pretty nicely, and without much technical detail.

The Semantic Web standards are complex, verbose, and hard to understand. They are backed by Web programmers prefer simpler standards: REST over SOAP, folksonomies over ontologies. Web guys do mashups and go to ETech; semantic technologists propose complex architectures and require large funders to get them realized.

It surprises me but it looks like the pressure of hard problems with good funding will overcome the complexity barrier of the Semantic Web. It surprises me not even so much because the syntaxes are complex and verbose, but the results are fairly inexpressive and inflexible in certain ways (for instance, OWL, the ontology standard, is based on description logic which makes it hard to do something as simple as default reasoning, something any simple old-fashioned frame system could do). Having been out of industrial grade AI for awhile, I will reserve judgement.