next up previous contents index
Next: Emacs-based chart browser Up: Inspection of (intermediate) results Previous: Inspection of (intermediate) results

Prolog commands

 The (intermediate) results of a parse can be inspected by the command show_item(ItemNumber) . This predicate displays the information which is contained in the chart item with ItemNumber. For example, if the LexGram parser told you that one of the results of the parse has been stored in item number 2, you can see its contents by typing

       

|?- show_item(2).
  +-- parse_result
  |'ITEM-ID': !(2)
  |'FROM-TO': !(0-1:[der])
  |'TRACES': !([])
  |'CAT-NAME': !(dp/n)
  |'CAT': +-- word
  |       |root: +-- root
  |       |      |syn: dp
  |       |      +--
  |       |leaves: [
  |       |        \ +-- goal
  |       |        \ |root: +-- root
  |       |        \ |      |syn: n
  |       |        \ |      +--
  |       |        \ |leaves: []
  |       |        \ |slash: []
  |       |        \ +--
  |       |        ]
  |       +--
  |'DTRS': !([leaf(der)])
  +--
parse_result is a built-in type with the following features. (For efficiency reasons, most of the feature values are instances of the prolog type, which is indicated by the !-operator.)

WARNINGS:

The Prolog query

| ?- bagof(N,show_item(N),_).
will enumerate all the chart items which have been produced during the derivation.

By the call of the predicate show_tree(ItemNumber)  a shorthand form of the derivation tree which is rooted in the item with ItemNumber is displayed. For example, the tree whose root is item 10 is shown by the command

| ?- show_tree(10).
vp:10
   dp:9
      dp/n:2
         der
      n:8
         mann
   vp\dp:5
      geht
The tree-internal numbers are also item numbers. The leaf nodes are either labeled with the individual words or with the symbol  t for 'trace'. The preterminal node of a trace is labeled with the same information as the category which licenses that trace. The goal category for a given sentence has the `item number'  0.


next up previous contents index
Next: Emacs-based chart browser Up: Inspection of (intermediate) results Previous: Inspection of (intermediate) results
Esther Koenig-Baumer
6/23/1998