Accidental neat trick
Thursday, September 16th, 2004 08:58![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
In four easy steps!
MangleImprove the RDF data model: instead of having the three disjoint types URI, blank node, and literal, everything in a graph is like a blank node and has 0 or more names which may be URIs, literals, or any E object—which will, you imagine, be used mainly for representing datatyped literals.Decide to have the basic graph class not know about any types of names, and allow any object, with only conventions for URIs and literals.
Realize that a trivial naive smusher can be written using this data model: for each triple whose predicate is an
owl:InverseFunctionalProperty
, add a name for the subject of the triple consisting of the predicate and object nodes, and any duplication must then result in the nodes being unified. This also preserves multiple URIs for the same subject without requiring duplicate triples.
Of course, I have no idea yet whether this model and library will be good for anything useful yet. (If nothing else, it will certainly be horribly slow.)
I should collect some use cases.