7.1 Nuts and bolts

The following pages

In the following pages we will demonstrate how (a small part of) a text can be represented in Prolog+CG. Through an example, we demonstrate:

  • how the knowledge base can be organized
  • how the text is represented in graphs
  • how the semantics of the domain is accounted for in an ontology
  • how queries can be constructed and
  • how computational operations can be used to reason over the knowledge base.

The example of Macbeth

In the following, we will represent a few sentences and expressions from the play "Macbeth" by William Shakespeare.

Consider the following quotes:

Macbeth: "Is that a dagger which I see before me?" (2.1.31)
Macbeth: "I'll fight, till from my bones my flesh be hacked." (5.3.34)

These examples are available as macbeth.plgCG and macbeth2.plgCG in the AAU directory.


Next, we describe how to organize the knowledge base.

PrevLite: 7 Formalizing texts
NextLite: 7.1.1 Organizing the knowledge base

Prev: 7 Formalizing texts
Up: 7 Formalizing texts
Next: 7.1.1 Organizing the knowledge base