The Use of Instrumentation in Grammar Engineering
Paper · 2000 · Norbert Broker
Summary
A grammar can pass a large collection of tests while much of its machinery remains untouched. It can also spend considerable time processing examples that exercise the same machinery repeatedly. Norbert Bröker’s paper asks how grammar developers can discover these mismatches. Its answer comes from software testing: attach identifying marks to the alternatives inside grammar rules, then collect those marks whenever a sentence receives an analysis. The resulting record connects individual examples to the grammatical decisions responsible for their analyses.
The paper adapts this idea to syntax and grammar formalisms, using a substantial German grammar written in Lexical Functional Grammar, or LFG. It distinguishes coverage of individual constraints, coverage of alternatives, and coverage of combinations of alternatives. These measures answer progressively stronger questions about what a test collection exercises. In the reported coverage investigation, the local collection contains 1787 usable examples but reaches only 1456 of the grammar’s 3730 disjuncts. A disjunct is an alternative available within a grammatical choice. The corresponding TSNLP collection contains 1093 examples and reaches 1081 disjuncts. The investigation exposes several reasons for an unused alternative: a missing test, an obsolete category, or a grammatical inconsistency that prevents the alternative from participating in any successful analysis.
The same records support more economical testing. Examples can be compared according to the alternatives they activate, the combinations they activate, or the number of times those alternatives occur. This makes redundancy a property of a particular grammar’s treatment of sentences. Linguistically different examples may count as equivalent if the grammar currently handles them through identical choices. The paper therefore treats equivalence as useful both for selecting faster regression tests and for discovering distinctions the grammar does not yet express. More aggressive selection produces much smaller collections, but sacrifices systematic checks of interactions between alternatives.
A further application is to parsing: retain the alternatives encountered in a sample of a particular genre and construct a smaller grammar from them. Experiments on technical and news material suggest an overall processing improvement by a factor of four. This reduction uses every analysis returned for the training sentences, without requiring a manually checked analysis for each sentence. That convenience also limits how selective the reduction can be, because unwanted analyses contribute their alternatives too.
The contribution is a way to inspect the relationship between grammatical knowledge, test examples, and actual processing. Instrumentation does not establish that an analysis is linguistically correct, nor does broad rule coverage guarantee that every interaction has been tested. It supplies a precise inventory of what successful analyses use. Developers can then turn that inventory into missing tests, diagnoses of suspicious behavior, economical regression collections, or approximate grammars for restricted kinds of text.
Interesting ideas
Measure the mechanism a test exercises
A test collection has an observable relationship to the implementation it evaluates. Counting sentences or organizing them under linguistic labels does not reveal that relationship by itself. Instrumentation makes it explicit by recording the grammar alternatives used in each successful analysis. This is useful whenever a system contains inspectable choices whose behavior should be exercised deliberately. A large collection may repeatedly visit familiar mechanisms while leaving substantial areas untouched. Recording those visits gives developers a concrete basis for deciding what additional evidence is needed.
The idea transfers particularly well to systems with handwritten rules, declarative constraints, or structured processing stages. The important requirement is an identifiable unit whose participation can be observed without confusing that participation with correctness. Coverage then becomes a diagnostic of the tests’ reach. It can identify a missing exercise of a mechanism even when the test collection looks broad from an external description.
Treat an unused alternative as an investigation
An alternative that never appears in successful analyses can have several explanations. The tests may omit a legitimate construction. The grammar may contain a remnant of an earlier design. A constraint elsewhere may make the alternative impossible to use. These explanations demand different responses, so deleting everything unused would throw away the distinction the measurement makes valuable.
The paper’s examples show why this matters. Missing circumposition examples call for new tests; a category removed from the lexicon calls for grammar cleanup; an impossible grammatical function calls for repairing an inconsistency. Elsewhere, the same reasoning applies to apparently unused configuration paths or declarative rules. Observation identifies a location for investigation, while a domain explanation determines the repair.
Define redundancy relative to the implementation
Different sentences need not provide different implementation evidence. Conversely, sentences that look similar may exercise different choices. The paper replaces an intuitive notion of duplicate tests with several explicit relations based on observed grammar use. This gives test selection a defensible purpose: preserve individual alternatives, preserve complete combinations, or preserve occurrence counts.
Such distinctions help separate quick development checks from more demanding regression evaluation. They also make clear what a smaller collection has discarded. A collection preserving every observed alternative may still omit the contexts in which alternatives interact. The reusable lesson is to state the evidence a reduced test collection preserves before treating its size reduction as an improvement.
Let equivalent examples expose missing distinctions
The paper does not regard every redundant sentence as disposable. Its examples involving eating something raw, eating while naked, and eating quickly are linguistically different, yet the grammar treats them through equivalent alternatives. That equivalence reveals something about the grammar’s current descriptive resolution.
This turns test reduction into a source of development questions. When examples intended to demonstrate different phenomena produce indistinguishable internal records, developers can ask whether the distinction belongs in the system and whether the present representation can express it. The approach is useful for transparent language systems because it connects an externally meaningful distinction to the internal machinery that currently collapses it.
Aggregate evidence from incorrect successes
An individual erroneous analysis may involve many alternatives, making its cause difficult to locate. The paper collects the alternatives occurring across sentences that should fail but receive analyses. Alternatives disproportionately associated with these incorrect successes become candidates for inspection.
This is a useful debugging principle wherever errors produce structured traces. Repeated association narrows the search without pretending to prove causation. The paper’s investigation reaches both a grammatical problem and a tokenizer interaction, showing why inspection must extend beyond the marked rule itself. A suspicious component can be where an error becomes visible even when another component helps create it.
Specialize by observed use, with a recovery path
A general grammar can be maintained as a shared resource while smaller grammars are derived for particular text types. Instrumentation supplies the selection criterion: retain alternatives used in the sample. This avoids separately authoring every specialized grammar and preserves a direct relationship to the general resource.
The proposed staged parser adds a useful qualification. A small grammar handles common constructions first, while larger grammars remain available when it fails. This arrangement offers a way to pursue efficiency without treating absence from a sample as proof that a construction is irrelevant. It applies most naturally where successful processing can be attempted in successive configurations and a broader configuration can recover from an earlier failure.
Deep dive: The Use of Instrumentation in Grammar Engineering
How grammar instrumentation exposes gaps in tests, identifies redundant examples, traces parsing errors, and supports faster genre-specific parsing. · about 37 minutes to read
How Mova uses it
For Mova, a small transparent language system implemented in Rust, the paper offers a concrete design for observing linguistic decisions. The relevant proposal is to attach stable identifiers to grammatical alternatives and include those identifiers in the trace of a successful analysis. The trace would explain which choices supported the result, while an aggregate report would show which choices a test collection exercised.
This is a possible application rather than an established Mova implementation. There is no basis here for claiming that Mova already records such identifiers, measures grammar coverage, or derives smaller grammars. The paper is useful because it describes what those facilities would need to observe and what conclusions their observations could support.
A Mova coverage report could distinguish several questions that are easy to blur. Does a test reach a constraint at all? Does it exercise both the presence and absence of an optional construction? Does it check a particular combination of grammatical decisions? These questions require different records and support different assurances. A report exposing those distinctions would fit a transparent system better than a single undifferentiated count of passing sentences.
The treatment of unused alternatives would also be valuable. A rule absent from all successful traces could be presented as an unresolved diagnostic: perhaps the tests lack an example, perhaps the rule is obsolete, or perhaps its constraints cannot be satisfied. The paper’s method would not determine which explanation is correct. It would make the unanswered question visible and connect it to a specific part of the grammar.
Test selection is another plausible application. Mova could retain a comprehensive collection of linguistic examples while selecting smaller subsets for routine development. Selection based on identical combinations would preserve more interaction evidence than selection based only on whether each alternative appears somewhere. The full collection would remain important when the grammar changes, because examples that are equivalent under the current grammar may cease to be equivalent after a new distinction is implemented.
A further possibility concerns debugging. If a sentence receives an analysis despite being marked unacceptable, the system could display its grammatical trace. Across a collection of such cases, repeated alternatives could be ranked for investigation. The paper supports this as a way to find candidates, not as a mechanism that automatically identifies the defective rule.
Genre-specific reduction is a more demanding extension. If Mova acquired a broad grammar and representative samples of a restricted application, recorded use could guide construction of smaller variants. The paper’s caveats would remain essential: observed use depends on the sample, all returned analyses may retain unwanted alternatives, and a reduced grammar may fail on legitimate constructions absent from the sample. A staged fallback to the general grammar would be a reasonable idea to investigate. No speed improvement for Mova follows from the German experiments alone.
The problem and its context
Why a passing test collection can be misleading
Grammar engineering combines a linguistic description with a computational implementation. A developer writes rules intended to account for constructions, then checks whether example sentences receive suitable analyses. Positive examples help reveal missing grammatical coverage. Negative examples, which are intended to be rejected, help reveal overgeneration: the acceptance of sentences the grammar should exclude.
Those tests are necessary, but their relationship to the implementation may remain obscure. A sentence can receive an analysis without using the rule the developer intended to test. Several apparently diverse examples can activate the same alternatives. A rule can survive in the grammar long after another rule has taken over its practical role. Without a record of actual use, these situations can remain hidden behind a satisfactory total of accepted examples.
The paper places this problem within the development of linguistic resources and processing software. Its introduction describes a field increasingly concerned with applications and substantial datasets. In that setting, quality evaluation should occur during development rather than being postponed until a resource appears complete. The motivation is practical: defects are easier to address when discovered before they have become entangled with later work.
The author draws on software engineering as a source of methods for making evaluation systematic. The paper cites EAGLES for a general evaluation framework and Ciravegna and colleagues for applying a software design methodology to linguistic engineering. Its own contribution is narrower. It takes instrumentation, which connects test inputs to executed program elements, and asks how an equivalent connection can be established for grammars.
What software coverage contributes
In imperative software, a test can be related to statements, branches, conditions, or execution paths. Each choice of unit yields a different coverage measure. Statement coverage asks whether individual instructions have run. Branch coverage asks whether the alternatives in control flow have been taken. Path coverage asks about complete routes through the program. Condition coverage examines the evaluation of conditions across different outcomes.
These measures differ in strength and practicality. Reaching a statement does not establish that every branch leading to it has been tested. Exercising branches separately does not establish that every complete path has been followed. Recursion and repeated processing can make the collection of paths too large, or unbounded, for exhaustive testing.
Instrumentation supplies the evidence for these measurements. Additional recording machinery is inserted into the program so that execution leaves a trace of the relevant elements. After the tests run, the recorded elements can be compared with the elements present in the implementation. Missing coverage then becomes a guide for constructing additional tests.
A grammar cannot simply inherit these software measures unchanged. An imperative program specifies operations and control flow. A declarative grammar specifies conditions under which an analysis is well formed. A parser searches for structures satisfying those conditions, potentially returning several analyses for an input. The units and observations must therefore be defined in terms appropriate to the grammar.
The paper’s central move is to preserve the testing question while changing the object being measured. Rather than asking which instructions executed, it asks which grammatical constraints and alternatives contributed to successful analyses. This connection to evaluation and benchmarks is valuable because it turns the grammar itself into a guide for examining the adequacy of its tests.
What earlier test construction emphasized
The author describes earlier test collections as primarily organized from a linguistic perspective. Flickinger and colleagues are presented as an early example of constructing tests around phenomena recognized in linguistic analysis. The collections surveyed by Balkan are described as following a similar orientation. TSNLP and its successor DiET likewise organize multilingual test material around linguistic distinctions.
That orientation serves an important purpose. A grammar should be evaluated against distinctions that matter linguistically, rather than only against whatever distinctions happen to exist in its current implementation. A collection organized by phenomena can expose an absent construction or an incorrect generalization. The paper does not propose replacing this approach with implementation coverage.
Instead, it argues that existing grammars contain another source of knowledge for test construction. Their rules encode distinctions that grammar writers have already worked to formulate. Instrumentation can recover the relationship between those distinctions and particular examples. The tests can then be checked for implementation gaps that a linguistic classification alone may not reveal.
The paper also discusses the use of corpus material. Earlier work considered corpora with varying degrees of annotation, but found that substantial manual work remained necessary to turn naturally occurring sentences into diagnostic tests. Corpus sentences often combine several phenomena and do not supply controlled variations of a single construction. They can inspire tests without automatically becoming a systematic test collection.
Oepen and Flickinger are cited for emphasizing the relationship between an application and its evaluation material. Bröker’s additional concern is the relationship between the grammar and that material. The intended contribution is therefore complementary: linguistic analysis describes what should be tested, while instrumentation reveals what the existing tests actually exercise.
Why grammar evolution makes the problem persistent
A grammar and its tests could, in principle, be developed together. Each new alternative could arrive with examples designed to exercise it. Yet the author argues that this ideal does not remove the need for instrumentation.
Some grammars already exist without corresponding test collections. More fundamentally, grammars change structure as they develop. A construction previously handled by a dedicated rule may later be covered by a more general mechanism. The earlier rule can remain present while becoming unnecessary. Its original tests may still succeed, giving no obvious indication that the implementation relationship has changed.
This means coverage is not merely an initial bookkeeping exercise. It must be understood relative to a particular grammar version. The same sentence may activate different alternatives after a revision. An equivalence class of tests can split when a new distinction is introduced. A previously essential rule can become unused.
Instrumentation makes those changes inspectable. It does not prevent grammar evolution or decide which design is best. It provides evidence about whether the implementation and the tests continue to correspond in the way the developer assumes.
The method, step by step
The method begins with a grammar whose alternatives can be identified separately. It adds recording marks, parses a collection of sentences, and associates the marks found in successful analyses with their originating sentences. Different analyses of these records support different applications.
From grammar alternatives to development evidence
The steps in order.
Define what counts as coverage
The weakest measure introduced in the paper is constraint coverage. A constraint can be a phrase-structure requirement or an equation over grammatical information, depending on the formalism. The measure compares the constraints observed in analyses with the constraints available in the grammar.
T_con = constraints exercised / constraints in the grammar
Here, T_con denotes constraint coverage. The numerator counts distinct constraints exercised by the evaluated examples, and the denominator counts the relevant constraints in the grammar. Repeatedly exercising an already observed constraint does not enlarge the set in the numerator.
This measure answers whether each piece of grammatical specification has participated somewhere. It does not necessarily check the alternatives surrounding that piece. An optional constituent illustrates the problem. A sentence containing the constituent may exercise its constraints, while leaving the grammar’s behavior when the constituent is absent untested.
The paper therefore introduces disjunction coverage.
T_dis = disjunctions covered / disjunctions in the grammar
T_dis denotes disjunction coverage. The numerator counts disjunctions whose alternatives have all been exercised separately. The denominator counts disjunctions present in the grammar. A disjunction is a grammatical choice among disjuncts, and each disjunct is an alternative within that choice.
Optional material must be represented as a genuine choice for this purpose. One alternative contains the optional constituent or equation; another contains an empty constraint. Testing only the overt realization does not test the omission. The paper treats this measure as encompassing constraint coverage because exercising all alternatives also exercises the constraints they contain.
There is a reporting detail to keep in mind. The formal definition concerns covered disjunctions, while the empirical coverage investigation reports totals of exercised disjuncts. The practical diagnostic is clear in either case: identify alternatives that successful analyses have never used. A careful interpretation should nevertheless distinguish the formal unit from the counted unit in the experimental report.
The strongest measure concerns interactions.
T_int = disjunct combinations exercised / legal disjunct combinations
T_int denotes interaction coverage. The numerator counts observed combinations of alternatives. The denominator comprises the combinations that can jointly produce a well-formed grammatical structure. A combination here is a complete selection of grammatical choices, rather than the mere presence of each choice somewhere in the test collection.
This distinction is central to the paper’s later treatment of redundancy. A collection can exercise every alternative individually while failing to test many combinations. An alternative may work in one context and interact badly with another choice elsewhere. Interaction coverage addresses that stronger question.
Recursion makes exhaustive interaction coverage problematic. Repeated application can generate an unbounded collection of legal combinations. The paper mentions a software-testing response: restrict recursive use when defining the target, for example by distinguishing nonuse from use once. Such a restriction makes the testing objective more manageable, but also changes what completeness means.
Understand the rule example
The illustrative verb-phrase rule includes a verb and optional noun-phrase and prepositional-phrase material. A noun phrase is a constituent organized around a noun; a prepositional phrase contains a preposition and its associated material. The example also contains alternative feature annotations associated with the prepositional phrase.
For constraint coverage, the author points to a sequence containing V, NP, and PP. V names the verbal category, NP the noun-phrase category, and PP the prepositional-phrase category. Such a sequence reaches all the displayed constituent categories. It does not on its own establish that the grammar behaves appropriately when an optional constituent is absent.
The paper’s illustration uses four test items to cover the phrase-structure choices involving the optional constituents. It then requires two additional items for the alternatives inside the prepositional-phrase annotation. The purpose is to show that visible constituent coverage leaves grammatical choices unchecked. The example should not be generalized into a universal minimum for every arrangement of optional categories.
The figures also matter conceptually because a grammar rule can contain choices at different levels. A phrase-structure alternative may determine which constituents are present, while an annotation may determine their grammatical interpretation. Instrumentation needs to reach both if the intended measure concerns the complete rule.
Choose a recording mechanism
The author identifies a broad implementation choice. The parser itself could be extended to record rule use, or the grammar formalism could carry the recording information. The paper explores the latter route through several mechanisms of increasing expressiveness.
The simplest uses an atomic feature associated with a particular disjunct.
DISJUNCT-nn = +
DISJUNCT-nn is a feature name containing the unique identifier nn for an alternative. The equality sign assigns that feature the atomic value +. Finding the feature in a completed analysis indicates that the corresponding alternative participated in constructing it.
This representation can require searching through embedded structures. If the feature is attached below the outermost structure, the reporting procedure must inspect the relevant levels. The method records participation, but the physical location of the information can make collection less convenient.
A set-valued feature offers a more direct collection mechanism.
DISJUNCT-nn ∈ DISJUNCTS
DISJUNCT-nn now denotes a symbol identifying an alternative. The membership sign ∈ places that symbol in DISJUNCTS, a set-valued feature used to collect such identifiers. Inspecting the set reveals which alternatives appeared.
A set does not preserve repeated occurrences. Once an identifier belongs to the set, adding it again does not distinguish a second use. That limitation matters if the developer wants to compare sentences by how frequently they apply the same alternative.
The implementation used in the paper therefore relies on a multiset of symbolic marks. A multiset retains multiplicity: an identifier can occur repeatedly, and its occurrence count remains available. The grammar environment provides a separate projection for these symbols. The author relates this facility to LFG’s use of distinct projections and cites Frank and colleagues for applications of the marking mechanism.
The practical benefit is that the marks associated with an entire analysis can be collected at its root. Their structural embedding does not matter for this purpose. A reporting procedure can recover both the alternatives used and their counts without searching each embedded grammatical structure separately.
Parse and associate records with examples
The instrumented grammar is run on the test collection or corpus. Each successful analysis contributes a record of its marked alternatives. These records establish the central relation: which sentence, through which returned analysis, exercised which grammatical choices.
Ambiguity needs attention here. A sentence may receive several analyses, and those analyses may use different combinations. The paper’s equivalence criterion explicitly allows comparison over combinations in the plural. For genre adaptation, the author states that the construction uses all analyses produced by the base grammar.
The record is therefore evidence about successful grammatical derivations, instead of a single unquestioned account of each sentence. It does not identify which analysis a linguist would prefer. Nor does it record the complete search process undertaken before the parser found its solutions.
After collection, the reporting procedure can aggregate over sentences. Taking the alternatives observed anywhere in the collection identifies the exercised portion of the grammar. Comparing that set with the full inventory identifies unused alternatives. Retaining sentence-level records allows more detailed comparisons and error investigations.
Turn coverage gaps into development questions
An unused alternative becomes a candidate for inspection. The developer asks whether it describes a legitimate construction and, if so, whether a suitable example can be added. If no grammatical sentence can use it, the reason may be an obsolete component or an incompatibility elsewhere.
The paper assumes an existing grammar and focuses on constructing or improving its tests. It does not generate all missing examples automatically. Instrumentation identifies what lacks evidence; grammatical reasoning supplies the example or explains why the alternative should be repaired or removed.
This division of labor is important. A report can precisely locate an unexercised disjunct while remaining unable to say whether the disjunct is useful. The linguistic interpretation of the report is part of the method’s application, not something coverage arithmetic can replace.
Compare tests at different strengths
For economy, the paper defines similarity through collective coverage. A sentence is redundant at this level if other sentences together exercise all of its alternatives. The other sentences need not reproduce the same combinations.
Equivalence is stronger. Another sentence must exercise exactly the same combination or combinations of alternatives. Strict equivalence adds a further condition: the alternatives must also occur equally often.
The reported reduction does not use strict equivalence. The author assumes, for that experiment, that an alternative functioning correctly on one occurrence need not be tested again merely because another sentence repeats it. The multiset recording mechanism nonetheless makes those repeated uses observable.
Equivalent examples are reduced by retaining an arbitrary representative from each group. The more aggressive similarity reduction uses a greedy procedure. Sentences exercising many alternatives are considered before those exercising fewer. A sentence is retained only when it adds an alternative not already covered by the selected sentences.
That procedure aims to preserve individual alternative coverage economically. It is not presented as finding a globally smallest collection. Its ordering also makes its purpose clear: acquire broad coverage early, then keep only examples that add something new at the chosen level.
Build a grammar from a genre sample
The adaptation procedure starts with an instrumented general grammar and a sample of the target genre. The parser analyzes the sample, and the procedure collects the alternatives occurring across its returned analyses. Alternatives absent from that collection are removed to produce a reduced grammar.
The experiment uses a training portion of 1000 sentences for each corpus and a separate test portion containing another 1000 sentences. Training here means selecting grammar material from observed use. It does not mean fitting numerical rule parameters.
The smaller grammar is then applied to the held-out portion. The evaluation examines processing time, grammar size, and differences from the base grammar’s outputs. Because the selected alternatives come from a finite sample, the resulting grammar is approximate. A legitimate construction absent from the sample may be unavailable later.
The proposed staged extension addresses this risk by arranging grammars from narrower to broader. Frequently encountered alternatives form the initial stage; less frequent and previously unused alternatives become available later. The parser advances when an earlier stage finds no solution and stops when a stage succeeds. This preserves the broader grammar as a recovery mechanism while giving common constructions an opportunity to be processed with less machinery.
Experiments and results
How much of the grammar did the tests exercise?
The completeness investigation uses a German grammar with 3730 disjuncts. The local test collection contributes 1787 examples to the reported calculation, exercising 1456 disjuncts. The TSNLP calculation uses 1093 examples and exercises 1081 disjuncts.
The paper’s broad finding is that substantial test collections leave much of the grammar unexercised. Its abstract describes the coverage as remaining below half of the grammar. The detailed counts show the result for each collection separately; they should not be treated as sufficient information for calculating their exact combined reach.
These are measurements of internal grammar use. They do not say that the remaining alternatives are all necessary, all correct, or all reachable. Indeed, the subsequent inspection is valuable precisely because the unused inventory contains several different kinds of problem.
The sample accounting also matters. The German TSNLP resource contains 1582 items overall, but the reported coverage figures exclude grammatical examples that the grammar failed to parse. The 1093 figure therefore describes the examples contributing to this successful-analysis measurement, rather than the complete linguistic scope of TSNLP.
That exclusion follows from the recording method. If an example receives no analysis, there is no successful derivation from which to recover the relevant marks. A missing analysis remains an important grammar failure, but it does not contribute an exercised-alternative record in this setup.
What the uncovered alternatives revealed
The circumposition example represents a test gap. A circumposition places related material around its complement. The grammar contains an alternative for the construction, but the collection lacks an example activating it. The appropriate response is to expand the tests so that this part of the grammar has explicit evidence.
The ADVadj example represents an implementation remnant. The category had already disappeared from the lexicon, while references remained in rules. Those references could no longer perform their intended role. A successful test elsewhere would not necessarily reveal the mismatch, because another analysis could still be available.
The FREEDAT example represents internal inconsistency. The intended free-dative function was not declared appropriately in the grammar’s configuration, and the relevant alternative could not satisfy LFG coherence. The problem was therefore not simply a shortage of example sentences. A sentence containing a free dative might already be present and still fail to obtain the intended analysis.
These cases establish the practical value of examining unused material. They do not constitute a quantified comparison of repair strategies, but they show that the coverage report can lead to different actionable diagnoses.
How much testing could be removed?
The economy experiment compares the parseable collection with versions reduced by equivalence and by similarity. The baseline is the original parseable collection for the same grammar. The measured outcomes are collection size and processing time.
For TSNLP, equivalence reduction retains 783 examples, reported as 71% of the baseline size. Similarity reduction retains 214 examples, reported as 19%. The runtime comparison is:
TSNLP test selection and total runtime
Broader redundancy removal substantially shortens testing while retaining weaker evidence.
The numbers
| System or setting | runtime in seconds |
|---|---|
| Parseable collection | 1537 |
| Equivalent cases removed | 665.3 |
| Similar cases removed (this paper) | 128.5 |
The paper reports the equivalent-case runtime as 43% of the baseline and the similarity-based runtime as 8%. These figures show that collection size alone does not determine processing cost. Removing a particular group of examples can have a larger runtime effect than its share of the sentence count might suggest.
For the local collection, equivalence reduction retains 1600 examples, reported as 89% of the starting size. Similarity reduction retains 331 examples, reported as 18%. Its timing comparison is:
Local test selection and total runtime
The aggressive subset is much faster but omits systematic interaction checks.
The numbers
| System or setting | runtime in seconds |
|---|---|
| Parseable collection | 1213 |
| Equivalent cases removed | 899.5 |
| Similar cases removed (this paper) | 175.0 |
The local equivalence runtime is reported as 74% of the baseline, while the similarity-based runtime is 14%. The star marks the fastest reported setting in each chart. It does not make that setting the strongest test collection.
The abstract’s broad statement about redundant testing time should therefore be read alongside the detailed table. The table describes specific selection policies with different evidential consequences. The most aggressive policy achieves its speed in part by discarding combinations that a more complete regression check would retain.
What equivalent sentences taught the developer
The adjective example distinguishes equivalence from strict equivalence. Phrases containing different amounts of attributive adjective material can use the same alternatives but repeat them different numbers of times. They match under a set-like view of alternatives while differing under a count-sensitive view.
The examples involving rawness, nakedness, and speed reveal a different issue. Their interpretations involve distinctions among a property of the object, a property of the subject, and a manner of eating. The grammar’s recorded alternatives do not distinguish those uses.
This finding supports a restrained interpretation of redundancy. The examples may be redundant for testing the current implementation, yet remain important for describing what the grammar should eventually distinguish. Retaining them in the broader collection preserves that linguistic agenda.
What the negative tests revealed
For overgeneration, the paper examines sentences marked ungrammatical that nevertheless receive analyses. It aggregates the disjuncts in those analyses and looks for alternatives unusually associated with incorrect successes.
The TSNLP investigation singles out six disjuncts. The most prominent appears in 26 sentences. Inspection separates the associated examples into different explanations. Some sentences in the group are actually grammatical. Others expose the treatment of a partial verb phrase containing an object noun phrase as an imperative. Another group involves a tokenizer interaction concerning capitalization.
The result is useful because the aggregation leads to a small, interpretable cluster. It is also explicitly preliminary. The paper does not report diagnostic accuracy for the procedure, nor establish that every often implicated alternative is itself defective.
The grammatical examples in the suspicious group are especially informative about the limits of the signal. Association with negatively marked material can reflect problems in the tests’ labels as well as problems in the grammar or processing pipeline. Human inspection remains necessary.
Which corpora were used for adaptation?
The adaptation study considers HC-DE, WHB, NEWS, and NEWS-SC. HC-DE contains copier or printer instructions, and WHB concerns vehicle maintenance. NEWS contains news sentences described as ranging from 5–30 words. NEWS-SC consists of verb-final subordinate clauses taken from news material.
The reported corpus coverage is 89% for HC-DE, 76% for WHB, 42% for NEWS, and 75% for NEWS-SC. These figures describe how much of the respective material the grammar covers. They are not alternative-coverage measurements and should not be confused with the earlier test-completeness results.
The development history differs across the corpora. The author reports making some effort to cover HC-DE, while the other corpora did not receive corresponding grammar development. That distinction matters when comparing outcomes across text types: the same general grammar did not approach each corpus with the same development attention.
The training and test procedure is shared. An instrumented base grammar analyzes the training portion, its observed alternatives define a reduced grammar, and that grammar is evaluated on a separate portion from the same corpus.
How much smaller was the adapted grammar?
The HC-DE size comparison gives a clear example of the reduction. In this experiment, the base grammar contains 3669 disjuncts and the reduced grammar contains 960.
HC-DE grammar adaptation and disjunct count
Selecting alternatives from observed genre use produces a substantially smaller grammar.
The numbers
| System or setting | grammar disjuncts |
|---|---|
| Base grammar | 3669 |
| Reduced grammar (this paper) | 960 |
The adaptation experiment’s base size differs from the grammar size reported in the earlier completeness investigation. These figures belong to their respective experiments. They should not be merged into a single fixed inventory or used to infer an undocumented change process.
The author reports an overall processing improvement by a factor of four. This refers to the observed reduction procedure and its processing measurements. It is not a claim that every sentence becomes equally faster, or that every genre produces the same reduced grammar.
The evaluation also distinguishes output mismatches from additions. A mismatch occurs when the returned analyses differ from those of the base grammar. An addition is a sentence that obtains an analysis with the smaller grammar after the base grammar failed because of time or memory limits. This distinction prevents practical resource failures from being mistaken for simple linguistic exclusion.
Why using every analysis matters
The reduced grammars are built from all analyses generated for the training material. They are not restricted to manually verified analyses. This makes the method usable before an adequately developed treebank is available.
The cost is that unwanted ambiguity helps preserve grammar material. If an incorrect analysis uses an alternative, that alternative can survive reduction even when the preferred analysis would not need it. The author presents the reported efficiency improvement as conservative in this respect.
The paper also notes that removing alternatives unused in the observed solutions leaves the number of those solutions unchanged. This is consistent with the selection procedure: it removes machinery outside the retained solution set. Using manually verified analyses could change that behavior, because alternatives supporting unwanted solutions would no longer be protected merely by having appeared somewhere.
How the comparison with specialization should be read
The paper discusses earlier grammar specialization by Rayner, Samuelsson, and Carter. That work derives specialized grammar material from a treebank and combines sequences of original rule applications into larger units.
The cited parsing-only speedup is 55. When lexical lookup is included, the reported factor is 6–10. The cited work also reports a recall decrease of 7.3% and a precision increase of 1.6%.
Those results provide context rather than a shared experimental baseline. Bröker’s approach starts from marked alternatives in the existing grammar and uses the normal parser. The comparison also involves different timing boundaries: the present study cannot isolate parsing time alone. The paper therefore warns against comparing its overall processing result directly with a parsing-only figure.
What the ablations show
The paper contains no conventional component-removal ablation; it instead offers comparisons among test-selection policies, grammar sizes, sample-derived fragments, and error groups.
Selection policy changes what a test run can establish
The comparison between equivalence reduction and similarity reduction is the clearest controlled analysis. Both policies use the same underlying records of alternative use, but preserve different information.
Equivalence reduction keeps representatives of complete observed combinations. Its justification is local to the current grammar: when another example exercises exactly the same combinations, repeating it offers no additional combination evidence under the chosen representation. The paper presents this as a useful level for checking changes before they enter a production grammar.
Similarity reduction preserves only the presence of individual alternatives across the selected collection. An example can be discarded even when its complete combination never appears in a retained sentence, provided its alternatives are all exercised somewhere else.
The much shorter runtimes of the similarity subsets therefore come with an explicit reduction in diagnostic strength. They are suitable for catching major breakage quickly, according to the author’s proposed use. They do not systematically test whether alternatives work together.
This analysis explains why a single notion of redundant testing would be inadequate. A sentence may add nothing to individual alternative coverage while remaining important for interaction testing. The appropriate selection policy depends on what kind of regression evidence the developer needs at that stage.
Counting repeated uses was available but not evaluated
Strict equivalence would preserve occurrence counts as well as the identities and combinations of alternatives. The multiset implementation makes that distinction representable, and the adjective example shows why it can arise.
The author does not include strict equivalence in the reported reduction experiment. The stated assumption is that an alternative shown to work need not be exercised repeatedly merely to establish that it can work again.
This is a methodological choice rather than an experimental finding about repetition. The study does not show that repeated application is harmless in all grammars, or that count-sensitive tests never reveal defects. It shows the savings achieved after choosing to ignore that dimension for the reported selection.
The distinction is useful because it exposes an assumption frequently left implicit in regression reduction. A test-selection procedure does not simply remove duplication; it chooses which differences between examples count as evidence.
Fragment grammars examine dependence on sample size
The adaptation analysis does more than compare a single base grammar with a single reduced grammar. It also constructs fragment grammars from randomly selected portions of the corpus and evaluates their coverage and runtime.
The question is whether a smaller sample captures enough of the genre’s constructions to produce a useful grammar. As the sample changes, the observed alternatives and the resulting grammar can change. Coverage on the test portion and processing time are therefore examined together.
The figure distinguishes performance on training material from performance on separate test material. This matters because a grammar selected from observed analyses has a direct advantage on the material that supplied those analyses. Performance on new sentences is the more relevant check of whether the sample captured reusable genre structure.
The analysis supports treating specialization as a sampling problem. It does not yield an exact universal training-size recommendation. The relevant relationship depends on the constructions present in the corpus and on how the general grammar analyzes them.
All analyses create a conservative reduction
Another important analysis concerns what is retained during adaptation. The procedure takes every analysis returned by the base grammar, instead of selecting a verified analysis for each training sentence.
This keeps the experiment operational without requiring completed manual verification. It also means that grammatical ambiguity limits reduction: several competing derivations can jointly preserve more alternatives than the intended analysis alone would require.
The author identifies a manually checked treebank as a way to improve this situation. At the time of the paper, that resource was not sufficiently developed for the experiment. As a consequence, the study does not measure the difference between all-analysis selection and verified-analysis selection.
The supported conclusion is narrower. Substantial efficiency improvement is possible even with the less selective source of traces. Further gains from verified analyses remain a proposal, rather than a reported controlled result.
Suspicious alternatives connect errors without proving a cause
The overgeneration investigation offers a qualitative analysis of aggregation. The same marked alternative appears across sentences with related incorrect outcomes. Inspecting the group reveals a connection to an imperative interpretation and to tokenizer behavior.
This is stronger evidence than observing an isolated bad analysis because it shows repeated structure across failures. It is weaker than a controlled repair experiment because the paper does not report removing or changing the candidate and measuring the resulting error reduction.
The group also includes grammatical sentences. That observation prevents a simplistic interpretation in which the suspicious alternative is treated as an automatic error label. The method identifies an informative neighborhood of behavior. The developer must still determine which examples are mislabeled, which analyses are wrong, and which component creates the problem.
Staged parsing remains an experimental proposal
The staged parser is motivated by the coverage risk of a reduced grammar. Its successive stages include frequent, less frequent, and previously unused alternatives. In the proposed arrangement, later stages contain the earlier grammar material as well as additional choices.
This provides a clear recovery argument: a sentence missed by a narrow stage can still reach the base grammar’s machinery. It does not establish a measured runtime advantage for the complete staged process.
The author reports ongoing experimentation with the meaning of frequent use. No final threshold or completed staged comparison is supplied. The analysis therefore supports instrumentation as a way to explore such configurations, while leaving their best organization and practical gains unresolved.
Limitations
Author-stated: the adaptation results are preliminary
The author explicitly presents the genre experiments as an illustration of applicability instead of a direct competition with specialization methods. This framing matters because the paper’s strongest contribution is methodological: it establishes a useful observation mechanism and demonstrates several applications.
The experiments do not amount to a comprehensive evaluation across grammars, parsers, or languages. Their reported gains belong to the German grammar and the corpora studied. The paper gives reasons to expect the method to be reusable, but it does not supply measurements establishing the same gains elsewhere.
The staged approach is even less settled. Its design is described, but the criterion separating frequent from infrequent alternatives is still under investigation. The existence of a plausible recovery scheme should not be confused with a completed performance result.
Author-stated: a sampled grammar is approximate
A reduced grammar reflects the alternatives encountered in its training sample. Absence from that sample is evidence of nonuse there, not proof that the alternative is irrelevant to the genre.
The author acknowledges that deleting even unlikely alternatives reduces grammatical coverage. A sample may miss a legitimate construction that later appears in the same kind of text. This is the principal reason for proposing stages that can fall back to broader grammar material.
The limitation also affects interpretation of smaller fragment grammars. A fast fragment may owe some of its speed to excluding material needed outside its sample. Coverage and runtime must therefore be considered together instead of treating compactness as an independent success.
Author-stated: the training analyses are not verified
The adaptation procedure uses the base grammar’s returned analyses without selecting only manually checked ones. The author describes this as a systematic source of imperfection that could be addressed with an adequately developed treebank.
This limitation affects selectivity. An alternative can survive because it participates in an unwanted analysis, even if the intended linguistic analysis does not require it. The resulting grammar may retain ambiguity that a verified source would eliminate.
The study does not quantify the additional improvement that verification would bring. It also does not establish that a verified reduction would preserve exactly the same set of outputs. The paper itself anticipates a change in the number of solutions when selection is based on checked analyses.
Author-stated: overgeneration diagnosis is suggestive
The author does not present the suspicious-disjunct investigation as conclusive. It is an encouraging diagnostic example in which a compact group of traces leads to identifiable problems.
There is no reported measure of how many real defects the procedure finds, how many candidates are misleading, or how often a proposed diagnosis leads to a successful repair. The grammatical sentences within the suspicious group further show that the negative labels require inspection.
The appropriate claim is that aggregation can make debugging more directed. It does not automatically identify a uniquely responsible rule, and it does not replace linguistic judgment about acceptability.
Author-stated: exhaustive interaction testing is generally impractical
Recursion can make the collection of legal grammatical combinations unbounded. This is the grammar analogue of the difficulty with complete path coverage in software.
Restricting recursive use makes an interaction target finite or more manageable, but it also limits the guarantee. Testing nonuse and a restricted use of recursion does not establish correct behavior for every longer or more deeply embedded structure.
The paper’s weaker coverage measures remain useful in this situation. They should be understood as practical lower levels of evidence, with explicit gaps between individual constraints, alternative choices, and complete combinations.
Careful-reader limit: use does not establish correctness
A mark establishes that an alternative contributed to a successful analysis. It does not establish that the sentence was analyzed correctly, that the interpretation was intended, or that another analysis should have been excluded.
This limitation is visible throughout the applications. The coverage inventory can include inappropriate alternatives. The adaptation procedure can preserve unwanted ambiguity. The negative-test procedure starts precisely from analyses that exist computationally but should not be accepted linguistically.
Instrumentation therefore measures participation. Correctness requires additional information, such as expected analyses, judgments about sentences, or inspection of the returned structures. A high coverage value should not be read as a high linguistic accuracy value.
Careful-reader limit: alternative coverage leaves interactions open
The paper presents complete alternative coverage as a strong basis for monitoring a grammar. Its separate interaction measure shows why that assurance needs qualification.
Every alternative might succeed somewhere while a particular combination fails. A revision could preserve an alternative’s familiar uses but break it in a context not represented by the tests. Individual coverage would remain intact even though grammatical behavior had deteriorated.
For the same reason, a similarity-reduced collection cannot support the same regression claims as one preserving complete combinations. It may be valuable as a quick check, but its coverage inventory is not an inventory of all tested interactions.
The stronger interpretation of completeness must therefore be relative to the selected criterion. A collection can be complete for the presence of alternatives while incomplete for their combinations, occurrence counts, or linguistic interpretations.
Careful-reader limit: failed searches are largely invisible
The proposed records are collected from successful analyses. They do not describe every attempted rule application or every constraint failure encountered during search.
An alternative that consumes substantial search effort but never appears in a completed analysis could be expensive without appearing in the successful-use inventory. Similarly, a grammatical sentence receiving no analysis cannot show which completed derivation should have existed.
This does not undermine the reported use of marks. It defines their observational boundary. A full investigation of parser efficiency or failure behavior would require evidence beyond the successful-solution records described here.
The distinction also matters for debugging. An incorrect success provides a trace that can be inspected. A correct sentence with no solution presents a different problem, and the paper’s completeness totals explicitly exclude such cases.
Careful-reader limit: reduction is grammar-dependent
Equivalence is defined relative to the current grammar. If the grammar changes, the relation between examples can change with it.
A sentence discarded from a routine subset may later become important because a new rule distinguishes it from the retained representative. The paper’s own predication example illustrates why linguistically motivated examples should remain available even when the implementation currently treats them alike.
The safe interpretation of the reduced collections is therefore operational. They are subsets for a particular testing purpose under a particular grammar, rather than permanent replacements for the comprehensive linguistic collection.
The greedy similarity procedure has an additional limitation. It chooses examples according to a simple ordering and accepts those that add uncovered alternatives. The paper does not establish that the resulting subset is the smallest possible one, nor that a different ordering would produce the same selection.
Careful-reader limit: raw labels can hide representation choices
Coverage values depend on how the grammar is divided into measurable units. A grammar with many small alternatives and one with fewer, more complex alternatives may express similar linguistic distinctions while producing different counts.
Even within the paper, constraints, disjunctions, disjuncts, and complete combinations are distinct units. Treating their coverage figures as interchangeable would obscure what was actually tested.
The formal definition and the empirical counting practice deserve particular care because the definition describes fully exercised disjunctions while the coverage investigation lists exercised disjuncts. The report clearly identifies a large untested inventory, but it does not justify ignoring the difference between these units in a new implementation.
This suggests a practical reading of the method: specify the counted objects precisely, retain the mapping back to the grammar, and interpret changes relative to that representation. The paper’s diagnostics are most persuasive when a missing mark can be traced to an identifiable linguistic or implementation question.
Careful-reader limit: the performance comparison is contextual
The earlier specialization results use a different construction procedure and a treebank. They also distinguish parsing-only time from time including lexical lookup. Bröker’s measurements do not offer the same separation.
As a consequence, the reported speedups should not be ranked as though they came from a common benchmark. They show that another approach can achieve substantial acceleration under its own conditions, while also exhibiting a recall tradeoff.
The present paper’s advantage is procedural simplicity: annotate an existing grammar, retain observed alternatives, and continue using the standard parser. Its experiments establish that this can be useful. They do not establish superiority over specialization or identify the best method for every application.
What came after
The paper ends with several directions whose outcomes it does not report. There is no documented later citing work available here that establishes how those directions developed. Its proposed extensions should therefore remain separate from a retrospective claim about influence.
One direction is to build reductions from manually verified analyses rather than from every solution the grammar produces. The motivation is clear: verified analyses could avoid preserving alternatives used only by unwanted interpretations. At the time of the study, the required treebank was still being developed, so the paper offers an anticipated improvement instead of a completed comparison.
Another direction is staged parsing. Instrumentation provides the usage information needed to organize successive grammars, but the practical division between frequent and infrequent alternatives remains open. The paper leaves a research question about how to balance early-stage speed against the cost of falling through to broader stages.
The conclusion also raises static analysis as a possible companion to runtime observation. A grammar inspection method might detect alternatives that cannot participate in any valid analysis, much as program analysis can identify unreachable code. This would address a question that instrumentation alone cannot settle: whether nonuse reflects missing tests or genuine impossibility.
The paper’s continuing value lies in these clearly separated questions. Runtime marks reveal what actual analyses use. Linguistic inspection explains whether that use is appropriate. Test selection decides which evidence to preserve during routine development. Sampling determines which grammar material a restricted application is likely to need. Keeping those questions distinct makes the method useful without asking its preliminary experiments to establish more than they do.
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Topics 1Research subjects and languages the work is about.Syntax & grammar formalisms · 225 works
Cite
Cite as Norbert Broker. 2000. The Use of Instrumentation in Grammar Engineering. COLING 2000 Volume 1: The 18th International Conference on Computational Linguistics.
@inproceedings{broker2000use,
title = {{The Use of Instrumentation in Grammar Engineering}},
author = {Norbert Broker},
booktitle = {COLING 2000 Volume 1: The 18th International Conference on Computational Linguistics},
year = {2000},
eprint = {cs/0011020},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/cs/0011020}
}References
- L. Balkan and F. Fouvry. 1995. Corpus-based test suite generation. TSNLP-WP 2.2, University of Essex. OpenAlex ↗ · Scholar ↗
- F. Beil, G. Carroll, D. Prescher, S. Riezler, and M. Rooth. 1999. Inside-outside estimation of a lexicalized PCFG for german. In Proc. 37th Annual Meeting of the ACL. Maryland. our card
- F. Ciravegna, A. Lavelli, D. Petrelli, and F. Pianesi. 1998. Developing language reesources and applications with GEPPETTO. In Proc. 1st Int'l Conf. on Language Resources and Evaluation, pages 619–625. Granada/Spain, 28-30 May 1998. OpenAlex ↗ · Scholar ↗
- EAGLES. 1996. Evaluation of Natural Language Processing Systems. Final Report EAG-EWG-PR.2. OpenAlex ↗ · Scholar ↗
- D. Estival, K. Falkedal, S. Lehmann, L. Balkan, S. Meijer, D. Arnold, S. Regnier-Prost, E. Dauphin, K. Netter, and S. Oepen. 1994. Test Suite Design — Annotation Scheme. Number D-WP2.2. OpenAlex ↗ · Scholar ↗
- D. Flickinger, J. Nerbonne, I. Sag, and T. Wasow. 1987. Toward Evaluation of NLP Systems. Hewlett-Packard Laboratories, Palo Alto/CA. OpenAlex ↗ · Scholar ↗
- A. Frank, T.H. King, J. Kuhn, and J. Maxwell. 1998. Optimality theory style constraint ranking in large-scale LFG grammar. In Proc. of the LFG98 Conference. Brisbane/AUS, Aug 1998, CSLI Online Publications. OpenAlex ↗ · Scholar ↗
- W.C. Hetzel. 1988. The complete guide to software testing. QED Information Sciences, Inc. Wellesley/MA 02181. OpenAlex ↗ · Scholar ↗
- R.M. Kaplan and J. Bresnan. 1982. Lexical-functional grammar: A formal system for grammatical representation. In J. Bresnan and R.M. Kaplan, editors, The Mental Representation of Grammatical Relations, pages 173–281. Cambridge, MA: MIT Press. OpenAlex ↗ · Scholar ↗
- R. Kaplan and P. Newman. 1997. Lexical resource reconciliation in the Xerox Linguistic Environment. In D. Estival, A. Lavelli, K. Netter, and F. Pianesi, editors, Workshop “Computational Environments for Grammar Development and Linguistic Engineering”, pages 54–61. Madrid. OpenAlex ↗ · Scholar ↗
- J. Kuhn and C. Rohrer. 1997. Approaching ambiguity in real-life sentences – the application of an optimality theory-inspired constraint ranking in a large LFG grammar. In Proc. DGfS-CL, Heidelberg/FRG. OpenAlex ↗ · Scholar ↗
- J. Kuhn, J. Eckle, and C. Rohrer. 1998. Lexicon acquisition with and for symbolic NLP-systems. In Proc. 1st Int'l Conf. on Language Resources and Evaluation, pages 89–95. Granada/ES. OpenAlex ↗ · Scholar ↗
- S. Lehmann and S. Oepen. 1996. Tsnlp - test suites for natural language processing. In Proc. 16th Int'l Conf. on Computational Linguistics, pages 711–716. Copenhagen/DK. OpenAlex ↗ · Scholar ↗
- K. Netter, S. Armstrong, T. Kiss, J. Klein, and S. Lehman. 1998. Diet - diagnostic and evaluation tools for nlp applications. In Proc. 1st Int'l Conf. on Language Resources and Evaluation, pages 573–579. Granada/Spain, 28-30 May 1998. OpenAlex ↗ · Scholar ↗
- S. Oepen and D.P. Flickinger. 1998. Towards systematic grammar profiling:test suite techn. 10 years afte. Journal of Computer Speech and Language, 12:411–435. OpenAlex ↗ · Scholar ↗
- M. Rayner and D. Carter. 1996. Fast parsing using pruning and grammar specialization. In Proc. 34th Annual Meeting of the ACL. Santa Cruz, USA. OpenAlex ↗ · Scholar ↗
- M. Rayner and C. Samuelsson. 1994. Corpus-based grammar specialization for fast analysis. In M.-S. Agnäs, H. Alshawi, I. Btrean, D. Carter, and K. Ceder, editors, Spoken Language Translator: First-Year Report, pages 41–54. Report CRC-043, Cambridge/UK: SRI International. OpenAlex ↗ · Scholar ↗
- C. Samuelsson. 1994. Grammar spezialization through entropy thresholds. In Proc. 32nd Annual Meeting of the ACL. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/broker-2000-use-instrumentation-grammar-engineering/