poetix

this time for sure

Tripoli: A Python Triplespace Implementation

I’ve just uploaded some rough and ready triplespace implementation code. This implements an indexed store for triples (3-tuples that represent binary relations, e.g. subject, predicate and object, as in RDF) and a tuple-space-like interface to the store with put, get, read, copy, copy-collect, copy-graph and copy-collect-graph operations.

The graph operations are the interesting ones, as they hook triples together into directed labelled graphs by treating the subject and object values in the triples as vertex labels, and the predicate values as edge labels. It’s possible to put a set of values like

Dominic, likes, Python

Python, is-cooler-than, Java

Haskell, is-cooler-than, Python

and then copy/collect the graph of triples connected to the node Dominic (Dominic likes Python, Python is cooler than Java) or to the node Haskell (Haskell is cooler than Python, Python is cooler than Java) into a separate triple space.

Much work left to do on this, but I had a sudden blaze of motivation today and thought I’d get as much done as possible while it lasted.