Next: Emacs-based chart browser
Up: Inspection of (intermediate) results
Previous: Inspection of (intermediate) results
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.)
-
'ITEM-ID' is the item number
-
The
'FROM-TO' value shows that the substring
[der]
is covered by the item between the string positions 0 and 1.
-
'TRACES' indicates the multiset of traces which have been
used as resources in addition to that substring, i.e. here this
set is empty.
-
The value of the
'CAT-NAME' feature is a categorial style
shorthand of the
cat-feature structure, i.e. it abbreviates
the structure written under the feature
'CAT'.
-
The
'CAT' value is the
cat-feature structure for the item.
-
The value of the
'DTRS' feature is the list of the daughters
of that node
WARNINGS:
- Elementary traces cannot be displayed by
show_item.
Inspect the licensing category instead.
- The structure sharing among the feature structure proper and
the residuated goals for the item will not be shown.
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: Emacs-based chart browser
Up: Inspection of (intermediate) results
Previous: Inspection of (intermediate) results
Esther Koenig-Baumer
6/23/1998