Elamur Research

Towards Efficient HPSG Generation for German, a Non-Configurational Language

Paper · 2012 · Berthold Crysmann and Woodley Packard

Summary

A generator that starts with a meaning and builds a German sentence has to make decisions about word order, case and verb placement before it knows what the finished sentence will look like. German gives it considerable freedom. An object may appear before the subject, a finite verb may be near the beginning or the end of a clause, and a verb can be separated from material that determines which phrases belong with it. A generator that builds phrases from the bottom up can therefore spend much of its time on candidates that look grammatical in isolation and fail only when it tries to complete the sentence. The authors study this problem in GG, a grammar that uses Head-Driven Phrase Structure Grammar (HPSG) for both sentence analysis and text generation.

Their solution is to inspect the meaning representation before building phrases. Some of the information the grammar needs is already stated there, but in a place that a local grammatical rule has no way to consult. For instance, the representation identifies what appears at the front of a clause. Copying that information onto a variable shared with the governing predicate lets the generator constrain how the corresponding complement is realized. Other constraints require interpreting a pattern in the input using knowledge of GG. The generator can, for instance, use the kind of clause and how it is embedded to work out where its finite verb belongs. A rule-based rewrite pass adds these details inside the generator, preserving a general interface for applications that supply meanings.

The authors test the method on German regression suites. With the full set of constraints enabled, average generation time fell from 0.257 to 0.054 seconds per item on the MRS suite and from 0.273 to 0.063 seconds on TSNLP. On Babel, whose items were longer on average, it fell from 7.213 to 0.260 seconds, a reported speedup factor of 27.79. Babel generation coverage rose from 96.7% to 100.0% under the experiment’s resource limits. The full configuration also left substantially fewer completed items in the chart.

The individual comparisons help explain where the gains came from. Marking extracted complements and identifying where fronted material belongs both saved time, as did narrowing punctuation choices across the sentence. Predicting agreement on modal and subject-raising verbs was the exception: it gave little benefit by itself, and the full configuration ran slightly faster on each suite when that feature was removed. Comparisons within Babel also show where the method mattered most. Shortening the suite reduced the relative speedup, while the plots for the original suite show that the enriched generator avoided the sharp growth in processing cost that the baseline encountered on longer items.

Deep dive: Towards Efficient HPSG Generation for German, a Non-Configurational Language

The paper shows how a German HPSG generator uses clues in meaning representations to avoid costly searches through word order and inflection. · about 35 minutes to read

The problem and its context

Producing a sentence from a meaning

A reversible grammar describes a relationship between expressions and their analyses. In parsing, the starting point is a string, and the grammar supplies possible analyses. In surface generation, the starting point is a representation of what an utterance should express, and the grammar supplies strings that can express it. Several strings may satisfy the same input. A generator that enumerates grammatical realizations has to keep legitimate alternatives available while avoiding work on partial structures that could never realize the requested meaning.

GG is the authors’ large German HPSG grammar. An HPSG grammar describes words and phrases by properties their structures must satisfy. A verb can specify, for example, that it still needs a complement with particular syntactic and semantic properties. A phrase rule combines suitable constituents if their requirements are compatible. The process uses unification, which brings descriptions together and fails when their requirements conflict. This places an important condition on early rejection. A conflict has to be visible in the descriptions available at the point where the rule applies.

ACE, the processing platform used in the experiments, builds phrases in a chart. The chart is a store of partial results that can be used in further combinations. Construction proceeds bottom up, from lexical entries and other elementary pieces towards larger structures. An edge is a chart entry. A completed noun phrase can be an edge even though its place in the eventual sentence is still open. In generation there is no input word sequence to establish which expressions already occupy adjacent positions. The search has to construct an ordering as it builds the realization.

Freedom of order is expensive in this setting for reasons that go beyond the number of sentences the grammar can ultimately produce. The chart may contain many hypotheses about which noun phrase belongs to which verb, which inflection is appropriate, or whether a gap still needs to be resolved. Most such hypotheses can be rejected once the relevant pieces meet. They can nonetheless participate in many combinations before that happens. The performance problem is how late the search obtains the information it needs to say that a combination cannot succeed.

Why German makes the problem visible

The paper uses non-configurational to describe a collection of properties that weaken the connection between surface position and grammatical relations. German permits considerable reordering of complements, including the subject. Modifiers can occur among those complements, so the generator cannot infer from an expression’s early presence in a partial phrase that it is the next argument the verb requires. Larger structures can eventually establish what the parts are doing. Much of the expensive search takes place while those structures are still being assembled.

Verb placement compounds the problem. A finite verb can occur in the initial part of a clause or at its end, depending on the construction. A non-finite verb is placed at the end of its phrase in the account used by the paper. Building these alternatives from the bottom up requires pursuing structures that grow in different directions. German also allows some prepositional phrases and clausal complements to appear beyond a verb in final position. With separable particle verbs, the finite verb can appear near the front and leave its particle behind. The grammar uses an analysis that simulates head movement to connect the pieces. The generator may have to build part of the clause before it can check which initial verb goes with that material.

An especially costly case arises when verbs share a cluster. An auxiliary, modal, raising verb or some control verbs can combine with a non-finite verb in a way that lets the higher verb’s syntactic requirements include arguments of the lower one. The grammar calls this argument composition. The paper illustrates the resulting order with a promise to buy someone a book. In the German example, the phrase for the book can occur before the subject of the promise, and the phrase for its recipient occurs later. The book and recipient belong with buying even though material associated with the higher verb is interspersed with them.

When the higher verb is finite and placed near the front, the generator can assemble the middle part of the clause before attaching that verb. A valence list records the arguments a head still requires. At this intermediate stage, the grammar may have to posit part of that list with only a general syntactic description for a slot. A phrase whose description fits can fill it provisionally, even if the meaning links that phrase to a different part of the sentence. The authors illustrate the danger with the phrase for last week. If a hypothesized slot lacks the semantic identity that would distinguish the intended argument, a phrase available in the chart can enter the analysis and the mismatch may surface only after more work.

Fronting a verb phrase poses a related problem. German can put a verb at the beginning while leaving some or all of its arguments in the middle field, the region of the clause where material can occur between the finite verb and elements farther to the right. The authors give versions of an instruction to buy someone a book in which the fronted material ranges from the infinitive on its own to the infinitive together with its objects. The generator constructs the rest of the clause before it joins the fronted expression. Until that junction, it has incomplete information about the valence of the missing verb phrase. It can therefore make several compatible-looking decisions about arguments, only to reject their combination when the fronted material arrives.

Case adds alternatives at a lower level. A noun phrase can be built in different case forms because the predicate that governs it may be absent from the current combination. Where a local head identifies its argument immediately, a wrong case can be rejected as soon as the two combine. In an analysis that uses underspecified valence, several forms can remain active for longer. This is one way in which morphology increases the cost of a syntactic uncertainty that begins elsewhere in the grammar.

What the generator could already do

ACE already applied two efficiency techniques associated with Carroll and Oepen. The first is local ambiguity packing under subsumption. When a chart contains alternatives whose descriptions can be represented together under a suitable more general description, the generator can share some of their processing. The alternatives remain available for recovery when complete results are unpacked. Packing is most helpful when the descriptions can be recognized as shareable early enough. The paper argues that German orders can leave the generator with distinct partial structures until it has assembled relatively large constituents, frequently clauses.

The second technique is index accessibility filtering. An index identifies a semantic participant or event. Accessibility can constrain whether an index that still matters to the intended realization can be reached through the grammatical structure under construction. The authors treat this filtering and packing as established parts of the generator. Both had been useful with the English Resource Grammar, and both were already useful with GG. German still presented enough costly combinations that the authors considered the existing system unsuitable for serious real-time generation.

The paper also discusses changing the formalism in which a unification grammar is processed. An approximation in context-free grammar had been proposed for HPSG parsing of English and Japanese. For the German generation problem, the authors question the advantage of a formalism that still needs to make many decisions with local information. Tree-adjoining grammar offers a larger structural domain in which related pieces can be represented together. The paper describes a German HPSG compilation that covered a fragment and a separate compilation effort for English and Japanese. It identifies the performance of those compilations in generation as an open empirical question.

Closer precedents used meaning representations to inform realization. In work on French tree-adjoining grammar, Gardent and Kow added information that helped select grammatical paraphrases. Zarrieß and Kuhn studied transfer from shallow semantics to the detailed functional structures needed by a German surface realizer. The paper uses that work to illustrate the value of rules that consider configurations of semantic roles together. Its discussion situates that approach alongside the development of a broad-coverage German Lexical Functional Grammar. Improving coverage and parsing quality of a large-scale LFG for German

A further alternative was beam search for English HPSG generation. A beam limits search by retaining a restricted set of promising candidates. The authors see room for combining that method with their own. Their proposed rewrite rules can exploit semantic information located far from the point of grammatical choice. A beam could then address decisions that remain after those constraints have been applied. The study itself evaluates the rewriting approach within ordinary chart generation.

The method, step by step

From the application’s input to the generator’s input

The experiment starts from Minimal Recursion Semantics, abbreviated MRS. An MRS describes an utterance through a collection of elementary predications and links among them. An elementary predication gives the name of a predicate and the values of roles associated with it. A verb predication can identify an event and a participant. A noun or pronoun predication can identify that same participant. If the role values share a variable, the representation records that they concern the same entity. It can also use labels and handles to represent connections involving scope, such as the relation of a modal to the event in its complement.

It helps to distinguish having a clue from having it where a grammar rule can use it. In the external MRS, an utterance-level relation can say which entity appears in the front field. A local phrase rule may be checking a verb’s argument list, which refers to that entity by a shared variable. Reading the argument list alone gives the rule no indication that a separate relation has identified that variable as fronted. If the generator first annotates the shared variable, the rule can check the fronting information where it already looks for the argument. The paper uses the same idea when the clue needs to be inferred from a larger pattern, such as the connection between the way a clause is embedded and the position of its finite verb.

In ACE, the extra information is private to the grammar’s processing. The external MRS can remain stable as grammar writers revise their internal representations or add constraints tailored to particular rules. The distinction matters for applications because a system that requests a realization needs a way to specify the intended content. Requiring it to calculate the syntactic features used by GG would give it part of the grammar writer’s job. A rewrite step between the application and the chart gives GG access to those features while allowing them to be derived from the external representation.

From external meaning to German surface realizations

The steps in order.

From external meaning to German surface realizationsStep 1: Receive the external MRS1. Receive the external MRSStep 2: Match semantic patterns with ordered rewrite rules2. Match semantic patterns with ordered rewrite rulesStep 3: Add local constraints for the grammar3. Add local constraints for the grammarStep 4: Find the grammar entries that seed the chart4. Find the grammar entries that seed the chartStep 5: Build and unpack complete chart analyses5. Build and unpack complete chart analysesStep 6: Convert their meanings back to external MRS6. Convert their meanings back to external MRSStep 7: Output strings compatible with the original input7. Output strings compatible with the original input

The internal MRS guides the choice of grammar entries that seed the chart. As search continues, grammar rules can consult the added information when they decide how to combine edges. A complete analysis associates a string with the lexical entries and rules that license it and with the resulting MRS. ACE applies the grammar’s post-parsing rewrite rules to convert that result back into its external form. It then compares the external result with the original request. This final check is part of deciding which strings to emit.

The check uses subsumption in a different place from ambiguity packing. Here, the question is whether the output realizes the predications specified by the input and preserves their variable identities, allowing the variable names themselves to change. An external result may be more specific than the request. That latitude is important for an input which deliberately leaves some semantic choices open so the grammar can offer paraphrases. The comparison concerns the public meaning representations, after the grammar has had an opportunity to remove internal details from the result.

ACE is the open-source platform the paper uses for generation, and GG is the open-source German grammar. The rewrite machinery comes from the term-rewriting approach developed for Minimal Recursion Semantics in the LOGON machine translation project. In that setting, a transfer grammar turns the meaning representation delivered by a source-language grammar into one appropriate for a target-language grammar. Crysmann and Packard apply the formalism at a different boundary. Their transfer operates between the external and internal semantic representations used by the German generator.

How an individual rewrite works

A transfer grammar is an ordered set of rules. A rule can inspect several predications at once and can tie their variable identities together. It can therefore express a condition like this: identify the participant mentioned by a pronoun, find a verbal argument that refers to that participant, and use a property of the pronoun to constrain something about the verb. This description captures the kind of connection a rule can make. The specific rules choose which relations and configurations warrant such a constraint.

The paper presents a rule as the following tuple.

⟨I, C, O, F⟩

The angle brackets enclose the ordered parts of the rule. I is the input pattern, which matches material to be replaced. C is the context pattern, which must also match the current MRS. O is the output pattern, which describes the replacement. F is the filter pattern, whose match blocks the rule. The commas separate the patterns. A rule can share information across its parts, so the replacement can preserve a variable or fill a property using something found in the matched material or its context.

A pattern can describe several elementary predications and can also refer to handle constraints. At the predicate-name level, a regular expression lets a rule cover a group of related predicate names. At the role level, the rule can require compatibility with a variable type, use subsumption to test its specificity, or demand equality to a type. Feature values on variables are matched by unifiability, meaning that their descriptions must be able to coexist. A shared tag can require an identity across two or more descriptions. This matters because two roles can both denote individuals without denoting the same individual. A rule that projects case or agreement onto a particular participant often depends on establishing the latter relationship.

The order of the rules and the order of matches for a single rule are separate questions. The transfer grammar can deliberately arrange its rules so that a specific configuration is handled before a more general one. Within an individual rule, the matcher may find several valid places to apply it. A rewrite changes the resources that later matches see. If the results depend on which match is processed first, trying different orders can lead to different outcomes.

The paper gives the count of possible match orderings as follows.

K!

K is the number of places where the rule matches the current input. The exclamation mark denotes factorial, which counts the permutations of those matches. Trying all such orderings can make rewriting itself more expensive than the generation work it was meant to save. The authors write their rules so that processing a rule’s matches in different orders yields the same result. ACE can then take one arbitrary ordering of the matches. The sequence of rules still matters, including when a general rule is supposed to handle only the cases left over by more specific ones.

Because the transfer formalism is as powerful as a Turing machine, the paper treats tractability as a property of the rule sets actually used. ACE also uses separate rule sets in the two directions. Parsing already provides an internal grammar analysis and then rewrites its semantics for external use. Generation receives an external representation and enriches it for chart search. Each rule set is designed for the job it performs.

Most of the new constraints are features added to variables. The grammar is adapted so that the corresponding rules and entries can react to specific values. When the transfer rules leave those values unspecified, the grammar can still apply as it did before. One constraint uses an additional role on a predication instead of a variable feature. Because a feature’s contribution can be controlled by activating its block of transfer rules, the same grammar supports the baseline, the full configuration and the individual comparisons. The enrichment rules were written by the authors. The disambiguated test sets supply inputs for evaluation, with no training stage for learning the rules.

Case and punctuation

Case prediction addresses a choice that a lexicon by itself often cannot settle. Certain properties can be known from the elementary predication or the associated entry, such as information about number or gender for a nominal expression. The appropriate case for an argument is frequently determined by the predicate that governs it. If the external representation identifies a participant as an argument of a particular predicate, the transfer grammar can use the predicate and its configuration to work out which case forms are relevant. It records that information through cas, making it available when lexical and phrasal variants enter the chart.

The authors use 35 rules for case prediction. Some environments provide a relatively direct link, including case governed by a preposition. Others require attention to raising and voice, because the surface case of a participant can change with the construction. There is also a limit to what can safely be represented as a feature of an individual variable. A relative clause can share an individual with the containing clause, and the variable can then be associated with distinct grammatical requirements. Assigning a single case to the variable would make that annotation apply in both places. The case rules exempt shared individuals of this kind.

The direct effect is to reduce the noun phrase variants available in the chart. A further intended effect concerns complex constructions. If a particle verb or a fronted verb phrase leaves a valence slot underspecified, any unsuitable form kept out of the chart is one fewer candidate that can satisfy the slot provisionally and prompt additional combinations. The case rule can act before the parser-style phrase-building machinery reaches the point at which the governing predicate could reject that form.

Punctuation reaches a broader collection of entries. GG treats punctuation through inflectional rules, as does the English Resource Grammar described in the paper. Before the chart knows the position of a word or phrase in the complete realization, an item can be available in 5 punctuation variants. The external meaning does, however, identify the clause’s sentence mode, such as whether it is a statement, question or command. Once that information is copied to the relevant predications, the grammar can restrict the variants of each affected item to 3 in the account that sets quotations aside.

The punctuation feature punct uses 5 rewrite rules. It applies to predications associated with heads, complements and modifiers. It therefore affects chart items that the case feature has little reason to constrain, such as a verbal head. The input-driven annotations have a common boundary. A semantically empty entry, such as an auxiliary or a relative pronoun in an analysis where it contributes no predication, has no elementary predication of its own to which the rewrite pass can attach a feature. The rules can still constrain semantically represented material that participates in the construction.

The paper gives the following quotient as the theoretical reduction factor for the punctuation variants and cites 1.67 when discussing it.

5/3

5 counts the punctuation variants before the restriction, and 3 counts those retained when sentence mode is available under the stated assumptions. The slash denotes division. This is a calculation about the variant inventory in the grammar. The number of chart edges actually built also reflects the items to which the feature applies and the combinations available to those items.

Verb placement and argument composition

The feature sub uses information about clause type to constrain the position of verbs. The German contrast does not reduce to a rule that treats every embedded clause alike. Relative clauses, embedded questions and subordinate clauses with particular introducers are among the environments associated with final placement. An embedded verb-second clause is one of the reasons to look more closely at the type of embedding and the information about fronted material. The transfer grammar considers sentence mode, how embedding is expressed, and what kind of element occupies the front field. It then assigns the verb a value associated with subordinate or non-subordinate order.

That decision has an immediate effect on simple clauses. It tells the generator which direction of structure building is appropriate. In discontinuous analyses, it also determines whether the chart needs to explore a derivation in which the verb is treated as moved. A grammar might license both placements across the language. The point of the feature is to make the intended clause construction visible before generation invests in partial analyses for both possibilities.

The feature coh constrains which arguments can participate in a cluster’s composed valence. Whether composition is possible depends on the lexical and constructional environment. The transfer rules mark arguments of non-finite complements in relevant environments, such as those created by modals, and mark arguments in periphrastic realizations such as perfective, future and passive constructions where composition is involved. Other predicate arguments receive a negative value. An underspecified slot can thereby require that a candidate at least belong to the class eligible for composition. This still leaves room for choices among candidates that pass the eligibility test.

An especially useful distinction is between eligibility and identity. The feature oind can identify the higher verb’s object when a raising or control construction calls for it. In a discontinuous cluster, part of the clause may be built while the initial higher verb is still missing. The generator otherwise has reason to consider an extra object slot even in a case where that verb contributes no object. An open slot also allows unrelated phrases to enter the local analysis. The transfer grammar uses the predicate–argument structure to determine whether the object exists and, where appropriate, which individual it is.

The transfer rule records that individual as an extra role on the relevant elementary predication. This is the feature family that alters the inventory of roles, allowing the grammar to use a particular variable to constrain an otherwise underspecified argument. The extra role repeats a connection already recoverable from the full meaning. At the chart stage, the value can be tested directly at a point where the higher verb itself is unavailable.

The agreement feature sind addresses a different consequence of having several verbs in a construction. A modal or subject-raising verb can agree with a syntactic subject supplied by the argument structure of its non-finite complement. The person and number needed for the inflection of the higher verb are thus recoverable by following the semantic structure to the lower verb’s argument. Writing those values onto the higher verb’s event variable lets the generator limit its inflected variants. The authors expected the saving to be concentrated in the restricted environments where this pattern occurs. They treated it as an empirical question whether the effect would justify the extra rewriting.

Fronted phrases and the positions they belong to

German frequently places a constituent in the Vorfeld, the front field of the clause. The analysis relates the fronted expression to the position where it would otherwise combine with its head. That position is called a gap. The extracting construction can stretch across more than one clause. The paper also emphasizes that common variation in the order of arguments and modifiers gives the generator little help from a presumed ordinary position for the missing material.

The external MRS supplies a useful starting point through TPC, a property of the proposition or question relation that identifies the distinguished variable associated with the fronted expression. The internal top feature makes that fact available on the shared variable. A governing predicate can then see whether a particular argument is to be realized locally or through extraction. In the straightforward case, the selected argument is marked as fronted, and the remaining arguments receive the local value.

Relative clauses require more care. A participant can be locally realized in the containing clause while corresponding to an extraction within its relative clause. A shared variable with a simple yes-or-no annotation would make both grammatical contexts see the same instruction. The transfer rules allow the values +, − and na. The positive value marks topicalized realization, the negative value marks non-topicalized realization, and na is neutral in the relativization case. Local complement rules accept the negative or neutral value. Complement extraction rules accept the positive or neutral value. As a result, the grammar can narrow the search for an ordinary argument and retain the necessary freedom where the variable serves both contexts.

The complementary feature tpc concerns the head at the gap site. A modifier may be fronted even though it has no slot on that head’s argument list. In that case, the semantic connection between the modifier and the material it modifies gives the rewrite pass a way to identify the gap. The rules distinguish modifiers that take another expression in their scope from intersective modifiers, whose contribution combines with what they modify. Fronting an entire verb phrase, or only part of one, leaves another configuration that the rules can recognize.

The transfer order matters for this feature. Rules first look for modifier fronting and partial verb-phrase fronting. They assign the corresponding type to the event variable of the relevant head. The remaining verbal and predicative relations receive a value permitting an argument gap. That value excludes modifier and verb fronting at those sites. With the two features in place, the grammar has a way to test both the status of an individual complement and the type of extraction a potential head can support.

Reading the paper’s example

The paper illustrates the enriched representation with Du sollst schnarchen, meaning that the addressee should snore. The proposition relation identifies x17 as its fronted participant. The pronoun has that variable as its own index, and the predication for snoring uses it as an argument. The relation for the modal identifies e19 as its event. Handles connect the modal’s complement with the predication for snoring. These links give the rewrite pass access to information that resides in several parts of the representation.

In the enriched input, x17 carries positive --TOP and --COH values. The first reflects the participant’s realization in the front field. The second records that the participant is eligible to take part in argument composition. Its person and number are recorded as 2s, for second-person singular. The modal’s event also carries 2s as the value of --SIND, illustrating how the agreement information reaches the finite verb from the subject of the lower verb. The modal is marked with a negative --SUB value for its clause context, and the relevant lexical predications carry the punctuation value for a proposition. The sample also displays a case constraint on the pronoun and an extraction-site constraint on the modal.

The example places several distinct grammatical decisions in one short input. Case is a property placed on the individual variable, agreement is projected onto a higher verb’s event, and punctuation is distributed across relevant predications. The information can enter the process through one rewrite system because its rules share access to the same meaning representation. At generation time, each grammar rule can look only at the part that affects its own application.

Experiments and results

How the evaluation inputs were obtained

The authors used regression suites intended to exercise grammatical phenomena in German. They parsed the items with the grammar and used the Redwoods tools for linguistic annotation to disambiguate successful analyses. The process yielded 2,259 MRS inputs for generation. The contributions totaled 609 from Babel, 1547 from TSNLP, and 103 from the German edition of the CSLI MRS test suite. The reported tests thus start with meanings obtained from utterances that the grammar could analyze, after disambiguation.

The suites provide different workloads. Babel averaged 6.76 words per item. TSNLP averaged 4.76 words, and the MRS suite averaged 4.44 words. The authors also note a difference in the grammatical phenomena represented. TSNLP includes non-sentential items that test agreement inside noun phrases. A technique concerned with where a finite verb goes or which complement is extracted has little opportunity to help on those items. The figures for each suite average across the kinds of constructions it contains.

The runs took place on a Linux server with 12 Intel Xeon X5650 CPUs at 2.67GHz and 16GB RAM. On a machine with no other workload, the authors ran 4 processes concurrently. The ACE configuration allotted 1.2 GB to creating the forest of analyses and another 300 MB to unpacking. Generation was capped at 1000 realizations per item. These settings matter for interpreting coverage because a grammar can license a realization which a particular run lacks the resources to reach or return.

The baseline used ACE with its established packing and index accessibility measures. It left the new transfer constraints inactive. The full condition enabled all of them, and additional conditions enabled a single feature or removed a single feature from the full set. The authors profiled the runs with the incr tsdb profiling environment. Overall processing time includes transfer, so an improvement means that the rewrite pass and the resulting generation together took less time than the baseline. The reported average transfer times were 29.4ms on Babel, 12.1ms on TSNLP and 13.2ms on the MRS suite.

Time, chart size and coverage

The full configuration reduced generation time substantially on each suite. On MRS the time fell from 0.257 to 0.054 seconds per item, with a reported speedup factor of 4.71. On TSNLP it fell from 0.273 to 0.063 seconds, a factor of 4.31. The pooled row for MRS, TSNLP and Babel reports 2.143 seconds per item for the baseline and 0.116 for the full configuration, with a speedup factor of 18.52. That row describes the combined collection of test items. The individual suite rows show how sharply the workloads and the observed gains differed.

Baseline and enriched ACE generation on Babel by average processing time

The full set of rewrite constraints substantially reduces processing time.

Baseline and enriched ACE generation on Babel by average processing timeACE baseline: 7.213ACE baseline7.213ACE with all rewrite constraints (this paper): 0.260ACE with all rewrite constraints (thispaper)0.260
The numbers
System or settingseconds per item
ACE baseline7.213
ACE with all rewrite constraints (this paper)0.260

On Babel the reported speedup factor for the full configuration is 27.79. The magnitude of the change is visible in the starting times as well as in the speedup factors. With the baseline, average processing time on Babel was much higher than on either of the shorter suites. With the full rewrite grammar, the Babel average stayed above those of MRS and TSNLP, on a much smaller scale than in the baseline comparison.

The passive-edge metric describes chart size. Passive edges are completed chart items. In the ordinary packed runs, a passive edge can represent multiple analyses. The reported counts should therefore be read as the amount of completed structure represented in the chart, with packing in operation, instead of a count of every derivation considered. Filtering an item early can save work in building it, in packing alternatives with it and in unpacking those alternatives. The authors use this to explain why savings in elapsed time can exceed the reductions suggested by the edge counts.

Baseline and enriched ACE generation on Babel by passive edges

The full rewrite grammar leaves far fewer completed items in the packed chart.

Baseline and enriched ACE generation on Babel by passive edgesACE baseline: 4864ACE baseline4864ACE with all rewrite constraints (this paper): 554ACE with all rewrite constraints (thispaper)554
The numbers
System or settingpassive edges
ACE baseline4864
ACE with all rewrite constraints (this paper)554

The passive-edge results follow the same direction on the shorter suites. MRS went from 703 in the baseline to 116 with all features, and TSNLP went from 693 to 172. Babel’s corresponding edge reduction factor was 8.78. The decline on all suites gives an account of the time improvement in terms of an observable change to the chart. Many partial results simply never need to be built or retained.

Generation coverage was 100.0% on MRS and TSNLP across the reported configurations. On Babel it was 96.7% for the baseline and 100.0% with the full set of features. The authors attribute the shortfall in the baseline and the runs with isolated features to occasional memory exhaustion. A time comparison could favor a configuration that stops on a hard case before completing generation. The authors point out that such a floor effect would favor the baseline here, since the enriched runs had at least as much coverage. The combination of better coverage, lower times and smaller charts argues that the full grammar is completing work that was previously too expensive within the same limits.

Why Babel mattered most

To investigate the link between length and speedup, the authors removed longer inputs from Babel and compared the baseline and full system on the shorter subsets. At a mean length of 4.85 words, the cumulative speedup was around 9.5. For a still shorter subset averaging 4.37 words, the reported speedup was 5.4. Shortening Babel brought its improvement closer to those of TSNLP and the MRS suite. Differences in which constructions survive the filtering still matter, but the within-suite comparison connects some of the original contrast to the longer items.

The paper also plots processing time and passive edges against string length for Babel. The authors report that baseline processing was already rising sharply at length 8, where time averaged around 8.4s. The runs with enrichment stayed below that level in the reported plot. The passive-edge plot likewise shows a much stronger increase for the baseline. For a prospective online generator, this matters because a handful of costly inputs can dominate the experience even when easy items are already fast. The plots complement the aggregate means by showing how differently the two configurations behave as the strings grow longer in this suite.

What the ablations show

What the two sets of comparisons measure

The authors first enable each feature by itself. This asks how much the feature can do when the generator still faces all the other uncertainties of the baseline. Then they remove each feature from the full rewrite grammar. This asks how much work returns once the other constraints have already reduced the search. A feature can perform well in isolation and have a smaller marginal effect in combination, or it can leave much of the baseline search intact and become valuable once another source of ambiguity has been removed. These tests help locate the effects without requiring a separate grammar for each experiment.

Most features improve processing in more than one suite by themselves and contribute to the combined system. Some comparisons also show why a small movement in time should be read alongside chart size and coverage. The transfer pass incurs work of its own, and a feature can reduce a part of the chart too small to change the total detectably at the precision shown. On Babel, adding a feature can also allow more items to finish within the memory limit. The reported time therefore describes a run that can differ from the baseline both in how much work each successful item needs and in which items complete.

The reach of case and punctuation

Punctuation produced a stronger and more consistent effect than case. On the MRS suite, enabling only punctuation brought average time from 0.257 to 0.150 seconds. Enabling only case brought it to 0.222 seconds. On TSNLP, the passive-edge counts were 458 with punctuation alone and 630 with case alone, compared with 693 in the baseline. The authors attribute the difference to how widely the features apply. Punctuation affects heads and modifiers as well as nominals. It also distributes the same sentence-mode information across predications, so it can cut variants without resolving which predicate governs an individual.

Case acts in a more specific setting. It must accommodate raising, voice and shared arguments, and a variable that connects a matrix predicate to a relative clause may have to be left unconstrained. Its isolated effect on Babel was still substantial, with average time of 4.547 seconds and 3817 passive edges. In the full configuration, turning case prediction off raised Babel time to 0.371 seconds. Turning punctuation prediction off raised it to 0.415 seconds. Those comparisons show that there was still useful pruning available from both features after the broader syntactic constraints had taken effect.

The edge counts give additional context for the punctuation mechanism. With punctuation alone, the Babel chart had 3364 passive edges. The paper compares reductions under this feature with the theoretical reduction in variant counts. The observed reductions are consistent with a feature that acts widely on lexical entries, even though an edge count includes the effects of later phrase building as well. The ablation measures the result of the full search, with the local inventory change as its starting point.

Clause order prediction improved times on all the suites when enabled on its own. With sub alone, Babel averaged 6.042 seconds, and TSNLP averaged 0.215 seconds. This fits the breadth of the feature in the grammar. A clause with a finite verb needs a decision about the appropriate placement and structure, even if it has no complex predicate. In the combined setting, removing sub raised Babel’s average time to 0.304 seconds. The feature therefore continued to eliminate some work after extraction, case and the other decisions had already been constrained.

Identifying the upper object with oind had a more construction-specific effect. The isolated condition averaged 5.506 seconds on Babel and 0.262 seconds on TSNLP. Removing the same feature from the full system brought Babel time to 0.526 seconds. The large marginal effect in that setting gives particular weight to identifying the argument that would otherwise fill a loosely specified slot. The feature’s contribution is compatible with a workload in which difficult cluster analyses persist even after the grammar knows much more about inflection, verb placement and gaps.

The coherence feature showed more variation. Used alone on Babel, coh brought average time to 5.681 seconds. On TSNLP the reported times were 0.275 seconds with coh alone and 0.273 in the baseline, with 692 and 693 passive edges respectively. Removing the feature from the full TSNLP configuration also produced a slightly lower reported time, 0.061 seconds. On Babel, removing it raised time to 0.353 seconds. The authors relate the variation to the constructions the feature can affect. Composition eligibility depends on particular predicates and on environments that include periphrastic forms. Its relevance can therefore change with the content of the test suite.

The results for sind make the strongest case for treating each rule family on its own merits. With subject agreement prediction alone, MRS averaged 0.262 seconds against a baseline of 0.257. On Babel the isolated mean moved from 7.213 to 7.035 seconds, a small improvement relative to the other features. Leaving the agreement feature out of the full system gave times of 0.050 seconds on MRS, 0.062 on TSNLP and 0.258 on Babel. Those are each slightly below the corresponding full settings. The paper regards the feature’s restricted scope as a plausible explanation for weak returns. The runs establish the direction of the observed timing changes. They do not give a per-rule account of how much of the difference came from transfer overhead.

Argument extraction and gap prediction

Both extraction features worked well in isolation and remained useful alongside the other constraints. On TSNLP, top alone brought the average time to 0.136 seconds, and tpc alone brought it to 0.178 seconds. On MRS their isolated times were 0.130 and 0.131 seconds respectively, with a baseline of 0.257. Babel gave a different ordering. With top alone it took 5.309 seconds per item. With tpc alone it took 3.602 seconds. The head-side feature had the largest isolated speedup on Babel, with a reported factor of 2.00.

Extraction constraints in the full Babel generator by average processing time

Either extraction feature reduces time in the combined system, with a larger effect from identifying the gap site.

Extraction constraints in the full Babel generator by average processing timeFull rewrite grammar without gap-site prediction: 0.897Full rewrite grammar without gap-siteprediction0.897Full rewrite grammar without argument fronting prediction: 0.381Full rewrite grammar without argumentfronting prediction0.381Full rewrite grammar with both extraction features (this paper): 0.260Full rewrite grammar with bothextraction features (this paper)0.260
The numbers
System or settingseconds per item
Full rewrite grammar without gap-site prediction0.897
Full rewrite grammar without argument fronting prediction0.381
Full rewrite grammar with both extraction features (this paper)0.260

The combined chart counts support the interpretation of that timing comparison. Babel had 825 passive edges without top and 1173 without tpc, against 554 with both features. On the shorter suites, the marginal counts have a different ordering. Removing top left 205 passive edges on MRS and 251 on TSNLP. Removing tpc left 150 and 228 respectively. The larger effect of head-side gap prediction on Babel therefore does not make it the dominant extraction feature on every workload.

The paper interprets the results as evidence that the two features remove substantially different uncertainties. top establishes when a complement can fill a local position by consulting its individual variable. tpc indicates which types of gaps a particular head can support, including gaps for modifiers that have no complement slot. A local complement decision can benefit from top even when the head already carries a useful gap-site annotation. Similarly, a fronted modifier still needs a gap site when the grammar already knows which complements are realized locally. The independent gains make sense because the grammar consults the features at different decisions.

Established search techniques still contribute

The authors also turn off index accessibility filtering and packing separately, leaving the rewrite features active. On Babel, disabling index filtering gave 0.433 seconds per item and 682 passive edges. Disabling packing gave 0.563 seconds and 1292 passive edges. Coverage without packing was 99.7%, compared with 100.0% with both established measures in place. These changes are comparable in scale to some of the individual feature removals. Packing can still share work for alternatives that are valid enough to survive the rewrite constraints.

The effect of index filtering varies across the suites. On MRS, disabling it produced 0.049 seconds per item against 0.054 for the full setting, while passive edges rose from 116 to 126. That comparison shows how the work saved by filtering and the time required to carry it out can lead to different orderings on the two metrics. The stronger effects on Babel show that enrichment can coexist with useful independent search controls, particularly on the suite where the chart has the greatest room to grow.

Limitations

Limits identified by the authors

The authors describe the German suites as general grammatical regression tests. They exercise linguistic phenomena and include very short or non-sentential material. The suite averages accordingly depend both on input length and on which phenomena appear frequently enough to matter. The authors’ Babel filtering experiment narrows the length comparison, while their discussion of TSNLP’s noun phrase items identifies a further source of variation. A speedup measured over one of these suites belongs to that mixture of inputs.

A second limit follows from where the method obtains its information. The enrichment rules act on elementary predications and their variables. A lexical item without such a predication falls outside their direct reach. Some constructions also make it unsafe to attach a single strict value to a variable that is shared between grammatical contexts. The case rules exempt such configurations where necessary, and the extraction rules use a neutral value for relativization. Those provisions help preserve the analyses the grammar needs, while leaving some search for the chart to perform.

The authors present portability as a matter of individual features and grammar design. A small experiment with the English Resource Grammar on the Rondane treebank yielded a 10.5% reduction in generation time for punctuation alone. They expect punctuation and extraction constraints to have uses across languages. They also suggest that case prediction could help with less configurational languages that combine rich case systems with relatively free order. The direct cross-language evidence presented here covers the punctuation feature on that English evaluation. The German rules for verb position and discontinuous predicates depend on the representations and constructions available in the grammar used for the main experiments.

The authors also acknowledge the computational power of the rewrite formalism and the importance of writing rules whose match orders can be collapsed. That gives the performance result a practical condition. The transfer stage is tractable for the rule sets tested, where arbitrary match ordering within a rule suffices. A more general rewrite system that required exploring alternative orders could move a large part of the cost from chart search into transfer.

Limits of the experimental setup

The generation inputs come from successful, disambiguated GG parses. This produces an interpretable, controlled set of meanings and removes an unrelated source of uncertainty about how to represent each test item. It also means that the measured success is conditional on the grammar having supplied an analysis in the first place. An external application could supply meanings that are unusually underspecified, combine semantic relations in unfamiliar ways, or fall beyond the grammar’s coverage. The same timing and coverage would need to be measured for that input distribution.

The coverage figure is an item-level measure subject to memory and output limits. A run with 100.0% coverage can generate for each evaluated input without demonstrating that it returned all paraphrases the grammar could license. The experiment caps the number of realizations at 1000 per item. The reported results give aggregate coverage, processing time and chart size. They leave open whether every configuration generates the same full set of strings for each item and whether differences, where present, affect which realization an application would prefer.

The stronger improvement on longer Babel items is evidence about the observed search, with a separate question left open about worst-case complexity. Shortening Babel changes its mix of constructions as well as the average string length. The scatter plots show where the baseline became costly in the tested range and how much the enriched system reduced that cost. An asymptotic bound for all inputs, or a guarantee of comparable response times on longer sentences outside the suites, would require evidence beyond those measurements.

Finally, enabling each feature alone and removing each from the combined system answers two practical questions about its contribution. It leaves many intermediate combinations untested. In particular, a large gain for the full configuration can arise because several features prune different branches of the same difficult search. The ablations give evidence about which distinctions matter and on which workloads. They do not assign the combined speedup uniquely to particular rule interactions.

What came after

Two later citing papers place the study in the context of computational grammar development and HPSG processing efficiency. Their citation establishes a connection to Crysmann and Packard’s work. The specific ways their implementations may have reused its rewrite rules or experimental setup remain open.

The Singlish paper from 2022 takes up the construction of a computational grammar for another language variety. Its connection to the German study is at the level of grammar development for the constructions a language actually uses. Crysmann and Packard began with a broad grammar and traced an engineering problem to the interaction of specific grammatical analyses with bottom-up search. The Singlish paper’s stated subject is constructing a grammar for Singlish. Its citation places the German study in that grammar-building context. Singlish Where Got Rules One? Constructing a Computational Grammar for Singlish

The supertagging paper from 2023 takes up the efficiency of HPSG parsing. Its title identifies supertagging as the technique under investigation, and the task starts from a surface string, the opposite direction of the German generation experiments. The common question is how to constrain the choices that an HPSG processor has to entertain during search. Crysmann and Packard address that question by deriving local constraints from a meaning input before chart generation. The later citation connects that work on generation efficiency to an inquiry about speeding up parsing. Revisiting Supertagging for Faster HPSG Pasing

Cite

Cite as Berthold Crysmann and Woodley Packard. 2012. Towards Efficient HPSG Generation for German, a Non-Configurational Language. Proceedings of COLING 2012.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{crysmann2012efficient,
  title = {{Towards Efficient HPSG Generation for German, a Non-Configurational Language}},
  author = {Berthold Crysmann and Woodley Packard},
  booktitle = {Proceedings of COLING 2012},
  year = {2012},
  url = {https://aclanthology.org/C12-1043/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/crysmann-2012-efficient-hpsg-generation-german-non/