Knowledge Engineering for Historians/Modelling Introducing Contexts

From Wikibooks, open books for an open world
< Knowledge Engineering for Historians
Jump to navigation Jump to search

Introducing Contexts[edit]

Since this is a book for historians, we will mention that there is a a whole history of the concepts underlying the following discussions, that we will however not get into just now, because they do not contribute to an initial understanding.

The basic problem of knowledge engineering is that the logical theories that perform the actual reasoning cannot deal well with inconsistent or contradicting information (remember those exploding computers on Star Trek?). Unfortunately, the human theories that knowledge engineering models are often mutually inconsistent.

Enter contexts, which basically allow us to assign the individual statements to individual speakers.

Contexts as additional Arguments[edit]

Speaking more as the knowledge engineers we are trying to become, we can best explain contexts by introducing a new relation: let ist mean "is true (in context)".

;; the controversy surrounding Wolfang Amadeus Mozart's relationship
;; with Antonio Salieri represented
;; contextualizing the claims via ist

While the first representation will clearly cause a contradiction, the second need not; indeed, the claims are nicely segregated into the different contexts. However, contextualization is an all-or-nothing proposition; either every statement is "curried" with a context, or none are. Typically, this situation is handled by identifying a base or default context where those things that are not sensibly contextualizable (i.e. shared by all contexts) can be placed.

Context Hierarchies[edit]

Contexts can be organized into subsumption hierarchies, just as we saw that type hierarchies can be.

Some of the background knowledge that our two contexts, Amadeus-TheMovie and Austria18thCenturyContext, share could now be moved into a parent context, say, GenericMozartFama or the like. Such movement of knowledge into other contexts is sometimes called lifting. Such an approach makes developing a new context very affordable: Most of what needs to be known has already been said in other contexts, which can then be simply subsumed in the new context.

Contexts are not First-Order-Logic[edit]

  • explain why the first-orderization using arguments does not work

Reasoning into Contexts[edit]

A side-effect of the ist approach to context representation is that it is relatively straight-forwarded to reason into other contexts. For example the following query could be used to find all cases where the movie and the real life of Mozart differ:

;; get the points of contention
&& subsumesContext(?CONTEXT-A,GenericMozartFama)
&& ist(?CONTEXT-B,not(?SENTENCE))
&& subsumesContext(?CONTEXT-B,GenericMozartFama)

Again, this is not a first-order logic query anymore, because we are no longer looking just at relations, but at whole sentences which include predicates. This is a higher-order query.

Some Notes on Implementation[edit]

Some representations languages, such as CycL are designed with strong assumptions about the availablility of contexts; there they are called microtheories and have special implementation support in OpenCyc and other implementations for CycL. Many representation or reasoning systems unfortunately do not have explicit support for contexts. And because of the non-FOL needs, simulating contexts may turn out to be difficult.


After this short overview of what contribution contexts make to the reasoning in knowledge engineering, we are ready to go into a large example that will highlight all of the features we have discussed so far. The hope is that this will draw the disparate pieces together and give you an idea of how knowledge engineering for historians becomes actionable.

Without further ado, let's look at our modelling example, Modelling the Christmas Story (see also Christmas).