Tags and Triples
Feb 9th, 2005 by Phil Dawes
Ok, I think I’ve refined the ‘tags for structured-metadata‘ idea to the point that I’m ready to start a prototype web-based store. Heres the basic gist:
The syntax
Basic syntax is s,p,o triples of tags:
PhilDawes a person PhilDawes age 23 PhilDawes worksFor drkw
To elaborate on the meaning of a term, you can add stuff in brackets after the term.
b2421 a DellLaptop (laptop computer) b2421 price 1500.24 (ukpounds)
If a term needs to contain spaces (e.g. its some text or something), you cat put it in quotes.
PhilDawes fullname "Philip Leslie Arthur Dawes"
The model
Same as above, but stuff in brackets is shortcut for more triples.
b2421 a DellLaptop DellLaptop _tag laptop DellLaptop _tag computer b2421 price 1500.24 1500.24 _tag ukpounds
Triples are scoped in named graphs. Named graphs are super-important in this model because of the requirement to be able to disambiguate through use of tags.
Notes
- I’m not currently distinguishing between literals and resources. Will think about this more when I hit problems.
- I haven’t decided whether to include blank-node functionality
- Tagging numbers could be problematic - it is common to want to use the same number in different contexts within a graph. If this pattern is unique to numbers then the store could just store each number seperately (different internal id).
- Am toying with the idea of making order implicit (like it is in xml). This would remove the need for cumbersome ordered-collection constructs that plague rdf, but at the expense of implementation complexity.

I think you should internally represent each literal as a resource. It should have e (generated) unique URI, and an rdf:value of the actual literal. This way, you can (in your model) adress different numbers for example.
[…] Semantic Web Python — PhilDawes @ 19:02 Made some software to explore the tag-triples idea a bit further. It doesnt attempt to do anything with context yet (alt […]
[…] ting tags in tagtriples Filed under: Semantic Web — PhilDawes @ 21:01 The tag triples idea is going quite well. Have built a simple prototype to test the idea, […]