-
Notifications
You must be signed in to change notification settings - Fork 0
Sentence Test Runner View
When making changes to a grammar, developing a new grammar, or combining grammars, it is useful to have a method for testing that certain sentences still parse successfully. A new addition to the ECG Workbench is the Sentence Test Runner View, which allows a grammar developer to test a suite of sentences automatically; the view then indicates how many of the sentences passed, how many failed, and how long it took to initialize the Analyzer and parse the sentences. This sort of batch testing is useful as an evaluation metric of one's grammar.
To open the view, navigate to Window –> Open View –> Other, which will pull up a menu.
Once the menu is opened, open the ECG folder, and highlight/double-click the Sentence Test Runner View.
This will open up the testing view, which should look like the image below, though maybe with different sentences. The sentences themselves are generated automatically from the EXAMPLE_SENTENCES field in the preferences file.
Running sentences is as simple as checking the box next to the sentences you want to test (or clicking "Select All"), then pressing the green playback button (see results below). Successful parses will look normal, and unsuccessful parses with be highlighted red. Evaluation metrics like time are displayed up top. Here, we see that two sentences failed to parse (likely because the correct packages were not imported), and the ECG Analyzer took 10 seconds to initialize, and 13 seconds total, meaning it took 3 seconds to parse all 18 sentences.