7.1.6 Adding knowledge

Introduction

So far we have been concerned with extracting knowledge that already exists in the graphs by manipulating them in various ways. But Prolog+CG also allows us to combine knowledge from different graphs, whereby new information may be reached.

In the following, consider the program macbeth2.plgCG in the AAU directory, which contains some minor additions to the original:

the following has been added to the type hierarchy:

person > man, pronoun, royal, thane.
man > king.
royal > king.

some comments have been added to the collection of graphs:

com(act2, [man: Macbeth]).
com(act5, [royal: Macbeth]).

The comments basically say that in act 2 Macbeth is considered a man, and in act 5 he is considered to be royal.

Finally, the first graph is refined just a little to include the fact that in act 2 Macbeth is a thane, and in act 5 he is a king:

 gr(act2,
  [act: ask]-
	-agnt->[thane: Macbeth]
   (...)

 gr(act5,
  [act: ask]-
	-agnt->[king: Macbeth]
   (...)

Generalizing

Generalization of graphs means that the common information found in two graphs is produced as a third graph. This means that the structure of the two graphs in question is compared, and that the concepts in a shared structure are rendered in terms of the least concept that subsumes them both (the least common subsumer).

In order to generalize the two utterances of Macbeth, use the predicate general(G) in the macbeth2.plgCG program, or write the query in full:

Generalize(
[act: ask]-
	-agnt->[thane: Macbeth],
	-thme->[proposition = 
		[act: see]-
			-agnt->[person: pn_I]
			-obj->[object: *x]-
				-bfore->[person: pn_me],
				-type->[dagger]],
[act: say]-
    -agnt->[king: Macbeth],
    -thme->[proposition = 
	[act: will_fight]-
	   -agnt->[person: pn_I],
	   -until->[state =
		      [hacked]-
			-ptnt->[flesh]<-poss-[person: pn_my],
			-from->[bone: {*}]<-poss-[person: pn_my]]],
G).

This yields the result:

{G = [act] -
            -agnt->[person : Macbeth],
            -thme->[proposition = [act]-agnt->[person : pn_I]]}

What we see here is the information that is common to both graphs. Note that [act: say] and [act: ask] have been generalized to [act], which is the least common subsumer. Likewise, [thane: Macbeth] and [king: Macbeth] have been generalized to [person: Macbeth].

The new graph also reveals the fact that in both graphs Macbeth talks about himself as the agent of doing something.

The more general graph shows us something new about the knowledge base, but at the same time, some information is left out.

Joining

Where generalization looks upward in the hierarchy, Join looks downwards in the hierarchy to find a the greatest lower bound of two concepts.

Let us investigate the join of the two small graphs containing comments. Use the predicate join(G) in the macbeth2.plgCG program, or write the query in full:

MaximalJoin([man: Macbeth], [royal: Macbeth], J).
This yields the result:
{J = [king : Macbeth]}

The reason is that [king] is the greatest type that is the subtype of both [man] and [royal].

The result is correct, but is raises a question, central to processing of semantic representations, namely how results may be interpreted.

This example is of course constructed in order to draw attention to the problem, but it is not an unreasonable scenario: all we did was to add "innocent" information to the knowledge base. The typehierarchy contains no controversial information, nor does the comments. The result, however, is only true in act 5, where Macbeth is king. In act 2 he is still a nobleman of lesser importance: a thane.

Next

Next we will demonstrate some templates you may find useful in your own translations of texts.


PrevLite: 7.1.5 Predicates
NextLite: 7.2 Templates

Prev: 7.1.5 Predicates
Up: 7.1 Nuts and bolts
Next: 7.2 Templates