KANTOO Java Applications

The Tester

The Tester is useful for keeping track of sentence translations within the KSDB. It hooks up to an Analyzer server and a Generator server, that are always kept running.

The Tester window provides two important sections: a toolbar full of buttons, and a data tree. We will first describe the data tree.

Data Tree

This tree contains all the information the KSDB has to offer regarding analysis and generation of a set of sentences. Since the Tester may only be invoked by the Rewriter, it works with the same set of sentences that the Rewriter works with.

Each line in the window represents a specific node in the tree. Any node with an arrow pointing right to the left of the text is 'collapsed'. Any node with an arrow pointing down is 'expanded', that is; you can see its descendent nodes. You may open or close any node by clicking on the arrow, or by double-clicking on the text. If a node is currently selected, you may expand the node using the right-arrow key, and you may collapse it using the left-arrow key. You may also travel up and down through the tree lines using the up-arrow key and the down-arrow key. Some nodes have no arrow, because these nodes have no descendents.

Let's examine each kind of node in turn, to see what their data represents.

All Sentences

This is the top-level node of the tree, and it contains as sub-nodes, every sentence that appeared in the Rewriter.

Source Sentence

Each source sentence appears under the top-level node. Each has a Translations subnode, which contains all info regarding Analyzer and Generator output on the sentence. Any sentence that requires context in order to be fully understood (i.e. if it contains anaphoric pronouns) also has a Context subnode.

Source sentences initially appear gray. However, as soon as you expand a sentence, it changes color, based on the following criteria:

Context

For source sentences that require context from their original document in order to be understood, this node contains one or more sentences that preceded this sentence.

Translations

This node contains the translation information for a source sentence. Its subnodes may fall into one of the following categories. Note that except for the Generator Versions node itself, all the Translation nodes will be available under the Generator Versions subnode. But the Translation nodes that are shown immediately are more significant, and receive more sophisticated treatment. Differences between the current translation and the correct translation or best translation are highlighted. Also the correctness of the current translation is manifested in the markup of the original source sentence (eg it is marked correct, incorrect, or unknown, and it may be boldfaced depending on the translation,

Generator Versions

This node contains as subnodes, every version of the Generator that the KSDB currently knows about. The current version of the Generator will be shown in italics.

Generator Version

This node contains all the translations of a source sentence that were generated by this generator version. Each translation occurs under a Translation subnode. The first translation will be the 'best' one, according to the following general heuristic:

Translation

This node contains a particular translation for a sentence. It will be colored according to if the sentence is correct, incorrect, or unknown.

All translations have a subnode that contains the score. You can change the score by double-clicking on the score node, or the translation node itself. You may also change the score of a translation using the Score button, or by hitting the s key when the sentence node is selected.

Some translations will have a subnode that contains a comment. You can add, change, or delete the comment by double-clicking on the comment node. You may also change the comment of a translation using the Comment button, or by typing Control-s key when the sentence node is selected.

Finally, all translations will have an Interlinguas subnode; this contains the IRs associated with the translation.

Interlinguas

This node contains the interlingua information for a source sentence. Note that except for the Analyzer Versions node itself, all the Interlingua nodes will be available under the Analyzer Versions subnode.

Analyzer Versions

This node contains as subnodes, every version of the Analyzer that the KSDB currently knows about. All versions of the Analyzer will be italicized except for the version of the currently active server, which should generally be the latest version.

Analyzer Version

This node contains all the interlinguas of a source sentence that were generated by this analyzer version. Each interlingua occurs under an Interlingua subnode.

Interlingua

This node contains a particular interlingua for a sentence. It will be colored according to if it is correct, incorrect, or unknown.

The text of an interlingua node actually contains 'IR ID=\'. The \ is indeed the actual ID number of the Interlingua as it is stored in the KSDB. The actual number doesn't matter, but it serves as an easy way for you (and the KSDB) to identify equivalent IRs.

All interlinguas have a subnode that contains the score. You can change the score by double-clicking on the score node, or the interlingua node itself. You may also change the score of a interlingua using the Score button, or by hitting the s key when the sentence node is selected.

Some interlinguas will have a subnode that contains a comment. You can add, change, or delete the comment by double-clicking on the comment node. You may also change the comment of a interlingua using the Comment button, or by typing Control-s key when the sentence node is selected.

Finally, all Interlinguas will have an IR Data subnode.

IR Data

This subnode contains the actual data of an Interlingua. The first subnode is the IR concept. Each subsequent subnode is a slot-value pair. But if a slot contains a sub-Interlingua as a value, then the sub-Interlingua is shown as a subtree.

Buttons

Run Analyzer

Sends every sentence to the active Analyzer server. Does not send sentences that have already been run on the current Analyzer. (unless the server has been updated more recently.) This option may take a while, it provides a dialog box indicating its progress. You may interrupt this option, and resume it as you please.

Run Generator

Sends every IR associated with every sentence to the active Generator server. Does not send IRs that have already been run on the current Generator. (unless the server has been updated more recently.) This option may take a while, it provides a dialog box indicating its progress. You may interrupt this option, and resume it as you please.

Note that you should run the Analyzer on all sentences before running the Generator. If you run the Generator without running the Analyzer, the system will not warn you that some sentences have not been analyzed yet.

Score

Allows you to assign a score to a translation or Interlingua. It brings up a dialog box containing all the possible scores, with the current score as default. If you change the score, then the Translations node containing the score will be collapsed; this is because your new score may significantly alter the tree, including scores of other Translations or Interlinguas.

Note that, in addition to this button, you can score a translation or Interlingua by double-clicking on it, or by selecting it and pressing S.

Comment

Allows you to assign a comment to a translation or Interlingua. It brings up a dialog box containing the current comment inside an entry field that you can edit. If you change the comment, then the Translations node containing the comment will be collapsed.

Note that, in addition to this button, you can comment a translation or Interlingua by selecting it and pressing Control-S.

Servers

Brings up a dialog that allows you to specify the host and port of the analyzer server used to check sentences, as well as the host and port of the generator server used for translating sentences. Once you specify a host and port, you can click the 'Check' button to make sure that a server is available at your given host and port. If one is, its current version info is printed. Once your server configuration is properly set, you may elect your changes to last during only this current invocation of the program, or for all future invocations.

Set Base Version

Allows you to assign a base version of the Analyzer and Generator against which the current versions' translations should be compared. When you set the base version of either the analyzer or the generator (or both) to something besides the current version, then all sentences' translations are compared against the base versions' translations, and differences in analyzer/generator behavior are highlighted. If the base version is not set, then the translations are only checked for correctness.

Note that you cannot set the base version once you have viewed the translations of any sentence...you should set the base version immediately upon Tester startup if you wish to compare the current version to a base version.

Next Unknown

Moves the selection to the next source sentence that has an unknownTranslations node. You may then score the translation. or run the Analyzer or Generator, if necessary. All preceding source sentences (whose translations are not unknown) will be collapsed.

If there are no remaining unknown translations, then the selection is moved to the All Sentences node, and all Source Sentence nodes are collapsed. Pressing the button again resumes the search from the beginning of the tree.

Note that, in addition to this button, you can go to the next unknown translation by pressing U.

Next Incorrect

Moves the selection to the next source sentence that has an incorrectTranslations node. You may then score the translation if you wish. All preceding source sentences (whose translations are not incorrect) will be collapsed.

If there are no remaining incorrect translations, then the selection is moved to the All Sentences node, and all Source Sentence nodes are collapsed. Pressing the button again resumes the search from the beginning of the tree.

Note that, in addition to this button, you can go to the next incorrect translation by pressing I.

Next Changed

Moves the selection to the next source sentence that has a translation that has changed between the current version and the base version. This only functions if you have set the base version of the analyzer or generator to something besides the current version. Also, expands that sentence's Translations node. You may then score the translation if you wish. All preceding source sentences (whose translations have not changed from the base version will be collapsed.

If there are no remaining changed translations, then the selection is moved to the All Sentences node, and all Source Sentence nodes are collapsed. Pressing the button again resumes the search from the beginning of the tree.

Note that, in addition to this button, you can go to the next changed translation by Pressing N.

Copy

Copies the text (without highlights) from the currently selected node onto the clipboard. Useful for pasting the text in another application.

Help

Brings up this Help page.

Close

Closes the Tester. It doesn't exit the overall KSDB itself.
KANTOO Java Applications