The third way
You should probably read this with a hat hard on – it’s a work in progress, but published here mainly as a motivation to edit and finish it.
Alternatives are tricky things. They complicate the world. If you were to tell me right now that I can have a ham sandwich I would be delighted. Honestly. But give me a choice between a ham sandwich and a vanilla slice and I would start to have some difficulty. Both choices are lovely, as far as I’m concerned. But having the choice places demands on me. I need to work out which I would prefer. I need to start comparing the options to my preferences and then make a decision, rather than just taking the free sandwich and saying thank you.
In this short essayette I want to talk about options, alternatives and the semantic web. I’ll talk about context, facts, validity and knowledge. I might also mention vanilla slices again.
Three, two, one… go
In the semantic web the number three is important. Knowledge, or rather statements of fact are expressed on the semantic web using triples.
Dan likes vanilla slices
This is literally a lovely triple. Like any triple, it’s a statement with a subject (Dan) a predicate (likes) and an object (that lovely, tasty vanilla slice). But just like any triple, it’s fairly limited.
On its own, a triple is just a fact – useful for a lull in a conversation, but not that rich. Triples become tremendously helpful when they are grouped together. In fact, that’s what the semantic web is largely about, lots of people sharing triples about the same sorts of things, with agreed rules, so that we can all benefit from a shared web of knowledge (factual statements).
Triples might be simple and of limited use on their own. But when you start to combine them, you turn your facts into a “graph” – an interlinked network with various directions of travel that agents (you, me and computers) can traverse to get to facts and build up journeys. This is the semantic web – interconnected facts that rely on each other and give each other meaning.
Just look at our example, it’s almost as if our initial triple creates spaces that need filling with more facts. What is a Dan? You might reasonably ask. We could answer with a triple:
Example: Dan is a person
Similarly you might want to describe what “likes” actually means. For example, we might say:
Example: People have preferences
Example: Like is a type of preference
Triples can populate the spaces left by each other. And because they follow rules as they do this, we can combine statements to fill in gaps. Given enough triples (and by knowing the rules that they follow) we can even start to infer things. For example, if we add to our growing list of triples a few about the nature of vanilla slices, things like:
Example: Vanilla slices taste of custard and icing
Then a computer can grab all the triples it has and use them. It might be possible to create a recommendation or suggestion of other food I might like, because they share characteristics with a stated preference.
Recommendation: Dan may enjoy egg custard.
Triple makes sense because somewhere, someone has described a set of rules. These rules define the type of relationship that can exist between subjects and objects and predicates. The rules are defined in an ontology which describes the kind of statements that we can make and the meanings that they can express. Ontologies create a little place in which the triple makes sense – it provides the equivalent of a dictionary, defining the potential meanings of each type of subject, predicate and object. Think of this “space” as being a little world, with its own set of laws – big, important laws, like gravity.
Imagine that each time I use Example: in this article I’m defining the named space in which the triple makes sense.
So a namespace is a tiny little world in which statements make sense – in that sense they sound a little bit like an argument. But they’re not argumentative, they’re just being helpful, and they can co-exist. We can combine lots of ontologies to make statements that complement each other…
This means that we can do proper domain driven design.
An ontology can concentrate on a limited, specialized view of
the world, and by combining with others can begin to express
more complicated facts about the world.
Ontologies describe a domain. Think of them as creating the map of a country. Triples are the roads and contour lines that add detail to the world and express. Using triples we could make two statements about place X. We can say that it is the location of the M1 and that it is 1000m above sea level. Both statements are true. There is only one X, but there are different facets that can be described about it.
Did I ever tell you that Mrs. McCave
Had twenty-three sons, and she named them all Dave?
Well, she did. And that wasn’t a smart thing to do.
You see, when she wants one, and calls out “Yoo-Hoo!
Come into the house, Dave!” she doesn’t get one.
All twenty-three Daves of hers come on the run!
The Semantic Web works because rather than calling things Dave, we create unique names for the entities and concepts we want to describe. We turn them into resources. Then we make statements about resources. So thinking back to our examples, each of the things that we have described is a unique resource.
This all works brilliantly. We create a named resource and our namespaces create little worlds in which we can make statements about it. With these tools we can take a snapshot of a world (in an ontology) and then describe it (in triples).
Unfortunately sometimes a snapshot isn’t enough. Remember, all we’ve got are statements, which are true for a snapshot. So we begin to struggle when we need to consider context – making statements that are only conditionally valid. Once we’ve filled up the three slots available in a triple, there’s no space left over to describe the context in which the triple is valid.
So there’s an issue we face when we’re making statements about the world ourselves. There’s an extra problem when we want to fill in our picture of the world through inference. Think back to our statement about place X. We know:
Example: Place X is the location of M1
Example: Place X is 1000m above sea level
So why shouldn’t we also be able to say:
Example: The M1 is 1000m above sea level (at Place x)
But how would we do this?
Don’t worry. I’m sure there’s a way to do it.
In both cases I’ve (awkwardly) written ‘Place X is the location of M1’. But this isn’t the way we naturally think about the M1. In fact, the M1 is a range of places. We need a more accurate model – and this is often the case when we come across problems in describing the world. You can only describe something when you really understand it – a fact that’s becoming more and more apparent as I write this. But I am getting to the point, I promise. If we were able to make the statement, ‘Place X is on the M1’, then we’re on much safer ground. All we need is an ontology that defines the meaning of ‘on the’ in relation to location for spatial entities that span multiple locations – motorways. We need to have modeled the appropriate context.
Remember back in the first paragraph where I brilliantly introduced a central metaphor that will tie this all together? No, I thought not. I said:
“I need to start comparing the options to my
preferences and then make a decision.”
It was probably the fact that this sentence seemed to refer to a pudding-based preference, rather than being completely about the problem of triples. In the real world, when we make a truthful statement, we’re either sure that it’s true in all cases, or we find an artful way to imply the context (in lots of cases context is self-evident in the real world).
Most of the time, assumptions are baked into the inferences we make about the nature of things. Our snapshots inherit everything we know about the world – so they’re not really snapshots, they’re complex moving pictures. But on the semantic web, statements is all there is. All we have is the static snapshot described in the ontology. If we leave out context from our snapshot, and we need it, then we will never be able to describe the world accurately and fully.
Imagine that I want to describe two jobs that I have had. Compare these triples:
Example: Dan is a content manager
Example: Dan is a user experience architect
Example: Dan was employed as an information architect
The top two are true at some point – but in the real world they’re true at different points in time. They describe a sequence not a snapshot. On the other hand, the third is true all the time, which is better. Unfortunately, just like the other ones, it doesn’t tell us anything about when, where or why.
A diversion into Reification
Reification is making statements about a statement. A triple is a statement. So we could use reification to say that Triple_1 is a statement. You can then make statements about the resource we have created to describe Triple_1. We could say that it is valid for 2012.
The problem with this is that it’s fairly artificial, and not good artificial in the way that some things are on the semantic web. In essence, everything on the web is a statement. To say that some sort of statements are special, because they’re just a bit more complicated isn’t the kind of brave, bold solution that naturally appeals. In some cases, if not most, maybe the problem of context arises because we haven’t created a detailed enough model.
I think any solution to the problem of describing context is going to feel a little artificial, because we’re making an implicit value and process explicit. But I think reification is a bit lazy. I think there are solutions that employ the same basic physics, but are more accurate and helpful. This “physics” is the process of creating a resource to point to, and using it to house the properties of the context.
A slice in time
Example: Dan was employed as an information architect
This is fine if we’re only interested in the jobs I’ve had in the past. But what if we want to say more? What if we want to describe the duration, or what I did while I had the job? In this case we turn the instance of me being an information architect into a resource. This unique instance can then have its own properties – like duration and projects.
Example: Resource_1 is a CV_event
Example: Resource_1 has agent Dan
Example: Resource_1 has duration 2008-2012
Example: Resource_1 has Project_1
We’ve now been able to give my time as an information architect at the BBC duration. I’ve also described a project that belongs to this period of employment. Imagine now that we have also modeled projects. We might be able to say:
Example: Project_1 has project manager Andrew Example
Example: Project_1 has designer Brian Forinstance
Example: Project_1 has information architect Dan
We now know that I have worked with Brian Forinstance – it’s all in the data.
Just like the rest of the semantic web, we’re building a graph – a web of triples. But because of the structure we defined in the ontology, we can tie these more closely together, forming a chain of triples. The idea is that by sharing a resource, we can bind triples together. We turn a snapshot into a flickbook by binding the statement together. For example, look at these two triples:
Example: Dan is famous for Project_1
Example: Project_1 is part of CV_event_2
Just like the rest of the semantic web, these triples will slot together. We can build ever more complex stores of data. And by creating these linking resources to contain shared context between resources we can describe context and help all our users to discover some of the when and why as well as the who and what of the semantic web.
Looking for conclusions? So am I. Hopefully this has been a useful diversion and prompted some thoughts. Hopefully at least some of these thoughts weren’t about vanilla slices.
I think, when you’re designing things for the web you can create something beautiful. You can priorities accuracy. But the measure of success has to be on whether it’s useful.
The semantic web reduces the world to a representation through a graph made up of statements. I’m currently thinking very hard about what we can most usefully make statements about. Should we limit ourselves to trying to describe the real world? Or should we acknowledge that everything anyone has ever known has been a representation, a shadow cast on a cave wall. Is there a way to feel empowered by this, and to use the artificiality of the semantic web to our advantage? Is there a way to create mental models, which can span a graph and provide multiple contexts to the world we create and describe? Do we need to name graphs as well as spaces, so that layered representations populate the regions we’ve defined through ontologies? Every time we set about rising to the challenge the semantic web creates, we are faced with choices. And unfortunately, alternatives are tricky things.