Editing Sentences
To edit the grammar coverage testset, select
the Coverage tab at the bottom of the grammar editor:
The main part of the editor is the sentence table.
- The first column, labelled !, shows an icon
indicating whether the sentence is an ING
(
) or an OOG
(
). Click on the
cell to toggle between ING and OOG.
- The Sentence column shows the text of the sentence
itself.
- The Interpretation column shows the reference
semantic interpretation for the sentence. It must be entered
as a JSON string.
- The Actual interpretation column shows the semantic
interpretation as computed by the grammar if the sentence
can be parsed.
- The Rule column shows which rule is used to
parse the sentence. If not specified, the grammar's root
rule is assumed. Click on a cell to edit its value.
- Finally, the Contexts column shows the contexts to
which the sentence is associated. Click on a cell to edit
its value.
To add a new sentence to the testset, simply type Enter when
the last sentence is selected (or when the testset is empty).
Clicking in the Sentence column in the first empty row
has the same effect. Just type the sentence and press Enter
again to accept the sentence.
By default, all new sentences are ING sentences. This is
indicated by the
icon in the first column of the table. To change a sentence to
an OOG, click on the icon. The icon changes to
.
Also, new sentences are always associated with the contexts
set in the current filter
(see Filtering).
The editor supports most usual editing commands:
- Undo/Redo
- Cut/Copy/Paste of sentences (within and across coverage editors)
- Select All
- Delete
The contexual menu in the sentence table has 6 entries:
- Test launches a coverage test run for the selected sentences;
- Interpret launches the Sentence Interpreter for the selected sentence (works only for a single sentence);
- Debug launches the Semantics Stepper for the selected sentence (works only for a single sentence);
- Delete deletes the selected sentences from the testset;
- Accept Interpretation makes the actual interpretation become the reference interpretation in all selected sentences;
- Change Interpretation opens a JSON editor to edit the reference interpretation of all selected sentences;
- Select Contexts opens a dialog box to associate the selected sentences with specific contexts.
- Select Rule opens a dialog box to associate the selected sentences with a specific rule.
Copyright © 2007,2008,2009,2010,2011 Nu Echo Inc.