In this section we shall describe the major features of semantic nets. Let us begin with a simple network; it is admittedly not much of a network, as it expresses only one simple relation, which is that the colour of canaries is yellow. The network is made up of two nodes and a link between them, showing that the nodes are related in some way.
The nodes might be taken to represent concepts, or perhaps sets of individuals, or other kinds of entity; the differences between these are important, and we shall discuss them in the next section. For the time being, we shall informally interpret them as representing concepts.
The nature of the relation is specified by the label on the link and by the left-to-right direction of the arrow. A reading of the network in the direction of the arrow might be something like ``A canary has a colour property, which is that it is yellow''; we might alternatively see the link as pointing out a particular kind of feature or attribute of canaries, and the node at the termination of the link as the value of that feature or attribute. If the arrow on the link were pointing the other way, of course, the meaning of the network would be ``The colour of yellow is canary,'' which is nonsense; so it is quite important that we use directed links in our networks.
In addition to giving a link a simple word as a label, we may wish to show that the concept used to label the link also has some relations to other concepts, and is thus also a node. For example, we might wish to show that there are different ways in which a thing may have a colour; it may have that colour only on the surface, such as the yellowness of a canary, or it may have that colour all through, such as the greenness of grass. The network in figure 6.2 shows this distinction, by making the label on the link between `canary' and `yellow' be `surface colour', which has the `is a kind of' relation (abbreviated to ako) to the abstract idea of `colour'.
[IMAGE ]
Figure 6.2: Semantic network for ``Tweetie is a yellow bird.''
This network represents the fact that the surface colour of canaries is yellow, that surface colour is a kind of colour, and that yellow is a colour.
We might also use semantic nets to represent the meaning of referring expressions in the `blocks-world' that we introduced in chapter 3. For example, the meaning of `the big blue box' might be something like what is shown in figure 6.3.
[IMAGE ]
Figure 6.3: Semantic network for `the big blue box'.
That same information, as we have shown in the discussion of the semantics of natural language, can be represented in the database by
[boxB isa box][boxB size large][boxB colour blue]
where `size' and `colour' indicate attributes of the particular box, boxB, and `large' and `blue' represent the values of those attributes for that box. Other boxes will have different values.
The isa link, however, indicates a very different kind of information: that boxB is an instance of a more general class or concept, that of `box'. This is a very useful sort of link in that it enables us to make simple kinds of inference.
In the two networks above we also have another type of link, ako. We have already seen an example of this, in our discussion of Collins and Quillian's psychological tests with semantic nets: Figure 6.1 implicitly conveyed the information that a bird is `a kind of' animal, that a canary is `a kind of' bird, that an ostrich is `a kind of' bird, and so on. Since a bird is an animal, any properties or attributes that are generally true of animals will also be true of birds; for example, if animals in general have skin, breathe, move around, and eat, then, unless there is evidence to the contrary, so do birds. In the same manner, whatever is true of birds in general is therefore also likely to be true of particular types of birds. The process of inferring that something has a property because it is a particular type of something else which has that property is called property inheritance.
In terms of the deductive reasoning that we sketched above, we may therefore legitimately make the following inference:
All animals have properties a,b, ...n.
Birds are animals.
Therefore birds have properties a,b, ...n.
We say that the concept `bird' inherits the property of having skin or of breathing from the concept `animal'. It may happen, however, that a particular kind of object will have peculiar properties that make it atypical of its superclass. A particular feature of ostriches that makes them atypical of birds, for example, is that they cannot fly. Attaching this information to the `ostrich' node will prevent the inheritance of the property `can fly' from the `bird' node.
The isa and ako relationships are transitive -- that is, if a relation holds between X and Y and between Y and Z, then it also holds between X and Z (but not necessarily between Z and X). For example, if a canary is a kind of bird and a bird is a kind of animal, then a canary is a kind of animal.
Suppose now we know that Tweetie is a canary. Even though we may not have been specifically told anything about Tweetie, we still know a great deal about him -- for example, that like other canaries he is yellow and can sing, that he is a bird, and, like other birds, that he has wings, feathers, and can fly. This information is nowhere explicitly stated of Tweetie; rather, we have inferred it by exploring isa, ako, and attribute links extending from `canary'.
So far in this section we have been talking about transitive relations between nodes, indicated by arrows pointing in one direction along the connecting links. Yet there are also occasions when we will wish to make inferences in both directions. For example, if Fred is the brother of Bill, then Bill is also the brother of Fred. Given the first fact, we will want to be able to infer the second. This kind of link is commutative: it indicates a symmetric relation between the nodes. In our Automated Tourist Guide, if we know that the London Underground station X is connected to station Y, we would want to infer that Y is also connected to X. The `connects' link is, in fact, both commutative and transitive: if there is a route from X to Y and there is a route from Y to Z, then there is a route from X to Z (transitivity) and also from Z to X (commutativity). We can indicate a commutative relation in a semantic net by a bidirectional link: