A Synchronous Context Free Grammar for Time Normalization
Paper · 2013 · Steven Bethard
Summary
A date can be easy to recognize and still take work to resolve. To place the day before yesterday on a timeline, a system needs a reference date and a way to work backward from it. With 2013-04-14 as the reference date, the phrase resolves to 2013-04-12 in ISO-TimeML, the representation used in the paper. This conversion is called time normalization. It matters whenever an application needs to connect events described in prose with times that can be compared across expressions and documents.
HeidelTime and TIMEN, the main comparison systems, use rules that map sequences of lexical entries directly to normalized values. In HeidelTime, yesterday and the day before yesterday therefore have separate rules. The paper proposes a synchronous context-free grammar that builds two trees together. One describes how the words fit together. The other describes the calendar operations those words call for. A phrase that specifies the week containing a date can reuse the interpretation of the date and add an operation that finds its enclosing week. To produce the final value, the system evaluates the operations from the inside out.
The paper manually develops a grammar for English by inspecting examples from AQUAINT and TimeBank. The resulting grammar has 354 rules, of which 192 are purely lexical. An extended CYK+ parser supports rules that mix literal words with grammatical categories, numeric categories that match ranges, and a special category for words that can be skipped. The grammar can also return competing interpretations. For an expression such as Monday, it can produce a past and a future reading, then use a heuristic that favors the earlier one.
On normalization accuracy, the grammar scores 76.5 against HeidelTime’s 74.7 on AQUAINT, 84.9 against 80.9 on TimeBank, 81.6 against 78.5 on the TempEval 2013 test set, and 56.5 against 49.1 on Timen. It also exceeds TIMEN on three corpora. On Timen, TIMEN leads with 67.8. A review of 33 expressions that TIMEN got right and the grammar got wrong found 21 involving output forms absent from the development data. The other cases comprised 6 gaps in grammar coverage, 4 incorrect choices by the heuristics, and 2 apparent annotation errors. The evaluation measures the accuracy of values assigned to time expressions and is separate from the official TempEval evaluation that also scores detection.
The results show that a grammar with reusable calendar operations can compete with direct mapping rules. They also expose two distinct demands on a normalizer. It must construct interpretations for the language and value formats in its data, and it must choose among those interpretations when the words admit several. The paper releases the English grammar and its implementation and proposes using surrounding text, such as verb tense, to improve that choice.
Deep dive: A Synchronous Context Free Grammar for Time Normalization
A synchronous grammar turns time expressions into calendar operations, improving normalization accuracy over HeidelTime on four corpora. · about 35 minutes to read
The problem and its context
From words to a place on a timeline
Time normalization begins with a linguistic expression and asks for a value in a common representation. A phrase can state a date overtly, describe how to find a time relative to a reference point, or specify a length of time. These uses share a vocabulary. A word like day can supply the unit for a duration, the granularity of a particular date, or part of an instruction to move from a reference date. The normalizer has to recover the role the word plays in the whole expression.
The reference point is especially important for relative expressions. In the paper’s opening example, the day before yesterday gives enough information to identify a day once today is supplied. The words specify relationships among days, and the supplied date determines where those relationships fall on the calendar. The same wording can consequently resolve to different dates on different occasions, even when the interpretation of the wording stays fixed. A useful formal representation preserves this distinction between the operation given by the words and the calendar value obtained by applying it.
Other expressions leave the relationship itself unsettled. Monday identifies a day of the week, but that much information can fit an occurrence in the past or in the future. For the day, an interpretation as a duration and an interpretation as a particular day differ in kind. An anchor can be sufficient for evaluating each candidate while leaving the choice between candidates open. These examples pose separate questions for a system. Which interpretations can it construct? What information does it use to prefer one?
The paper situates normalization within information extraction because an extracted event frequently needs a usable time. One document can refer to a day by a date and another by a relative phrase. Once the relative phrase is resolved, the normalized values can support a chronological comparison. The paper also connects interest in the task to the inclusion of time normalization in the ACE and TempEval shared tasks. Those settings make it possible to evaluate temporal processing on common data, while still leaving room for different decisions about which part of the task a particular experiment measures.
Direct mappings and nested expressions
The paper describes the prevailing approach as rule-based string-to-string translation. A lexicon first identifies the entries associated with words in the input. A rule recognizes the resulting sequence and maps it to the form required for the normalized value. HeidelTime and TIMEN exemplify this approach. Its rules can specify how to handle a whole expression, including any calculation needed to obtain its value. The distinction the paper draws concerns how much structure the rule system can share across expressions.
Consider the relationship between yesterday and the day before yesterday. In the latter, the meaning of yesterday supplies the starting point for a further operation. An analysis that allows nesting can make the smaller expression a component of the larger one. The rule for the larger phrase then describes how to move from the inner day. The paper points out that HeidelTime treats the expressions with separate rules. The repetition matters because the same phenomenon arises whenever the meaning of a phrase is built from an embedded time and a relation to that time.
The paper’s other central example, the week of March 6, brings out a different kind of nesting. The words March 6 identify calendar fields and suggest a date. The outer phrase requests a span with week granularity that includes that date. The date can receive an interpretation on its own, and that interpretation can serve as input to the week operation. The unit week occurs earlier in the wording, although the date must be found before the week can be computed. A representation with separate trees for wording and operations makes that difference in order explicit.
Compositionality is the idea that the meaning of a larger expression can be built from the meanings of its parts and the way those parts are combined. Here it has a concrete consequence for the rules. An expression that resolves to a span can appear inside a larger expression that requires a span, provided the source grammar licenses the combination. This makes it possible for interpretation rules to describe relationships such as enclosure without also having to spell out every embedded date pattern. A complete grammar still needs lexical entries and rules for the ways people express those relationships.
The paper separates those rules from the format of a finished value. A week, a duration, or an instant can appear inside an interpretation as an object with a particular role in a calculation. Only after the calculation does the system produce the required value. This separation makes the example of an enclosing week easier to understand. The outer operator needs a date or span and a unit. It can obtain them from grammatical components before any final string is produced.
An earlier compositional approach
The paper identifies Parsing Time: Learning to Interpret Time Expressions as an earlier approach that already built structured meanings. Angeli and colleagues define typed elements and operations. For example, their representation gives day a duration type, and an operation such as Shift Left takes a range and a duration and returns a range. Learning uses expectation-maximization to infer alignments between words and elements of the target grammar. This is a different starting point from writing a direct mapping for each lexical pattern.
Bethard identifies two ways to change that earlier design. One concerns the kinds of rules the grammar can express. The restrictions described in the paper rule out a production that combines two grammatical constituents with a literal word such as before. A rule of that shape can name the relation directly in the wording pattern and identify both components that participate in it. The proposed grammar also allows productions with more than two elements on the right-hand side. Both features affect what can be expressed in a single production.
The other difference concerns the choice of semantic primitives. Angeli and colleagues treat yesterday as a primitive of their target grammar. Bethard’s representation builds familiar expressions such as today and yesterday from more general operations. This places the lexical knowledge and the calendar operation at different levels. The word or phrase can have its own source rule, while the target side can share operations for enclosing a reference point in a day or shifting a span through time.
The comparison with prior work therefore involves more than whether a system uses rules. Direct mappings, a learned compositional grammar, and a manually constructed synchronous grammar make different choices about the units of interpretation, their internal structure, and how the connection to words is established. The paper adopts explicit calendar operations and paired grammar rules, then develops a parser that accommodates the source patterns those rules require.
The method, step by step
The two trees
The procedure starts with the words of a time expression and the information needed to anchor its interpretation. The task of parsing is to find the grammatical structures that can cover the input. In this system, each rule used to build such a structure also specifies a piece of the corresponding temporal interpretation. A source tree records the grammatical analysis, and its paired target tree records how to compute a time value.
Take the week of March 6. The grammar needs to identify week as a unit and March 6 as the part that supplies a date. A particular reading looks backward from the reference time to find a matching date. It then expands that date to the enclosing week. The target tree expresses these decisions with nested operations. The inner operation finds the date, and the outer one finds the week that contains it.
That backward reading is one candidate. The grammar can also build a reading in which the date is the next occurrence of March 6. Both candidates keep the same basic division between the unit and the embedded date. The alternatives differ in the operation used to find the date, while the operation that encloses it in a week can stay the same. The system uses heuristics to choose among the candidates when the phrase admits several.
From a time expression to a normalized value
The steps in order.
The two trees give the system an intermediate representation that can be inspected before a date is written out. For instance, it is possible to distinguish a candidate that contains an earlier-date operation from one that contains a later-date operation. In practical terms, this turns normalization into a form of semantic parsing, with an executable interpretation as the target.
What a synchronous rule specifies
A context-free rule names a category and states what that category can expand into. A terminal is an item that appears directly in a rule’s yield, such as a word on the source side. A nonterminal stands for something that can itself be expanded, such as a span or a unit. The synchronous version pairs a source expansion with a target expansion and indicates how the pieces correspond.
X → (S, T, A)
X is the nonterminal being expanded, and → marks the expansion. S is its sequence of source-side terminals and nonterminals. T is its sequence on the target side, and A aligns occurrences of nonterminals across the two sequences. The parentheses enclose the three parts of the rule. The letters represent whole pieces of a production, so the rule can describe several source or target elements at once.
The alignment carries the meaning of a child from one tree to the right position in the other. It does not depend on the child appearing in the same position on both sides. In the week example, the unit comes before the date in the English phrase. On the target side, the enclosing operation receives the span and then the unit. The alignment says which child provides each argument. It also separates the alignment of categories from the handling of literal words. A word such as of can be required in the source pattern while the corresponding target structure uses an operator.
The implementation relaxes the usual correspondence described by the basic formalism. A source nonterminal can occur on the target side 0 or more times. This allows the target rule to omit a source constituent or use one more than once. The paper’s treatment of words marked [Nil] illustrates omission. Such words can be consumed in the source analysis without supplying a calendar object to evaluate. The relaxation works alongside the freedom to use different terminals on the two sides.
Here is the week rule with indices showing the constituent alignment.
[TimeSpan] → ([Unit]₂ of [TimeSpan]₃, FindEnclosing [TimeSpan]₃ [Unit]₂)
[TimeSpan] to the left of → is the parent category. Within the parentheses, the material before the comma is the source pattern, including the literal word of. The material after it is the target expansion. FindEnclosing is the operation that takes a span and a unit. The subscript ₂ identifies the same unit constituent on both sides, and ₃ identifies the same embedded span on both sides. Square brackets mark grammatical categories. The embedded [TimeSpan] can have its own internal derivation, which is how a single application of the outer rule can work with a date built from several pieces.
The example also explains why the source grammar admits partially lexicalized productions. Here, of is a fixed part of the pattern, while the unit and time span are open to substitution by anything the relevant categories can derive. Requiring that word within the rule ties the enclosing interpretation to a specific construction. The child categories leave the contents of that construction free to vary.
Objects for describing and calculating times
The target grammar distinguishes a time span from a period. A span is positioned on the timeline. A period describes an amount or extent of time that can be used, for instance, to move a span. A field associates a component of the calendar or clock with a value. A unit specifies the scale of an operation or period. An integer supplies the number a field or period needs. In the grammar, these roles are represented by [TimeSpan], [Period], [Field], [Unit], and [Int].
A field and a unit answer different questions. Month of year identifies a kind of coordinate, and a number assigned to that field identifies a particular month. Weeks gives a scale such as the one used to enlarge a date to its enclosing week. A field assignment contributes a condition for finding a time. A unit supplies the scale at which to measure or construct something. The paper’s target grammar uses the temporal field and temporal unit types supplied by java.time, with examples ranging from day or hour fields to seconds, weeks, and decades as units.
Fields can also be grouped. In March 6, the month and day each give a condition, and the search for a date must satisfy both. An assignment to the month field licenses a wider set of dates than the combination of month and day. Grouping the assignments gives a way to express the latter without creating a different calendar operator for every combination of fields. The target description can carry the conditions as an argument to a general operation that searches for a matching span.
The grammar provides several ways to construct a period. A simple period combines an integer with a unit. A fractional period uses two integer arguments and a unit to represent a fractional quantity. An unspecified period names the unit and leaves the amount unspecified. A period can also carry a modifier. These forms explain why a duration deserves its own category. A quantity used to shift a span, for example, must be represented in a way the shift operation can consume, even if the expression gives less than a fully specified number of units.
Spans have their own operators. Past, Present, and Future are available as basic forms. FindEarlier and FindLater take a span and field constraints, as illustrated by the two possible readings of the March date. FindEnclosing takes a span and a unit. FindEnclosed takes a span and fields, expressing an operation in which the fields help locate something within the supplied span. This pair of signatures distinguishes using a unit to establish a containing span from using fields to find a span inside another one.
The target grammar also has StartAtEndOf and EndAtStartOf, which pair a span with a period and use a boundary of the given span to locate the result. MoveEarlier and MoveLater likewise take a span and a period, with the period supplying the extent of the shift. WithModifier can attach a modifier to a span or a period. The modifiers are those specified for the mod attribute of TimeML’s TIMEX3 representation. The argument categories matter here because the same grammatical interface can serve a variety of source expressions with the same kind of temporal relationship.
The paper shows how these choices make a word such as today expressible through more general concepts. The target operation for today expands the instantaneous reference point to the span of its enclosing calendar day.
FindEnclosing(Present, Days)
FindEnclosing constructs a time span at the granularity of the unit it receives. Present supplies the reference point as an instantaneous span. Days supplies the calendar unit for the result. The parentheses delimit the arguments and the comma separates them. The expression denotes the enclosing day as a span, which can then serve as an input to another temporal operation.
With that representation, the distinction between a point and its enclosing day is explicit. A relative phrase that asks for another day can use the day span as a meaningful intermediate object. This is the sense in which the paper builds common lexical meanings out of primitive operations. The grammar still has to recognize the word, but the word’s interpretation can use the same operation that appears in a larger construction.
How the chart parser finds a complete analysis
The parser works primarily with the source sides of the rules. Once it has found an analysis, the paired expansions and alignments specify the target structure for that particular derivation. The source analysis is built bottom-up. The algorithm records analyses of shorter portions of the expression and uses those records to assemble longer ones. The paper adapts CYK+, whose treatment of productions with more than two elements provides a starting point for the grammar.
The algorithm takes a grammar and a sequence of tokens. Tokens are the input items over which the parser counts spans, including the separate words and numeric items in the running example. The parser uses a complete chart and a partial chart. A complete entry shows that a rule’s source requirements have all been met for a span. A partial entry records a rule that has matched an initial portion of its right-hand side and is waiting for the rest. This includes the position within the production at which matching should resume.
C(n, i), P(n, i)
C is the chart of complete entries, and P is the chart of partial entries. n is the number of tokens covered by an entry, and i is its starting index in the input. Parentheses group the two indices, and the comma within each pair separates the span length from its start. The comma between the chart entries separates the two kinds of record for the same span. Multiple entries can occupy a cell when more than one rule or analysis fits.
(|w| + 1) × |w|
This is the size the paper gives for each chart. w is the input token sequence and |w| is its length. The + adds 1 in the length dimension, and × separates the row and column dimensions. The parentheses group the row count. A row can be addressed by span length, and a column by start position. The example uses indexes that begin at 0.
The chart structure lets the parser use the same completed constituent when exploring different rules. If the tokens for a date have already been recognized as a time span, an outer rule can use that result once it reaches the appropriate position. A partial entry stores the remaining requirements of the outer rule, including whether the next item is a literal token or a nonterminal. A filled chart thus records possible grammatical combinations alongside lexical matches.
The paper extends the initialization to recognize numeric tokens. A grammar can contain a typed integer category that applies to a range, such as [Int:1-31]. The algorithm checks the value of a numeric token against the bounds of such categories and creates an applicable rule during parsing. The category specifies the allowed interval, while the generated rule retains the particular numeral used in the expression.
x ≤ ToNumber(wᵢ) ≤ y
x and y are the lower and upper bounds named in the grammar’s integer category. wᵢ is the token in sequence w at index i. ToNumber converts that token to a value for the comparison, and its parentheses mark the argument. The ≤ signs make both bounds inclusive. If the test succeeds, the parser can enter a completed integer analysis for the token under that category.
The same numeral can potentially satisfy more than one ranged category if the grammar contains overlapping bounds. The check establishes eligibility to participate in an analysis. The larger source production determines what grammatical role the numeral plays. In the running example the range is appropriate for a day-of-month constituent, and the matching number is available for the target interpretation. The grammar can specify this treatment without writing an individual lexical entry for every allowed number.
Initialization also looks for rules whose right-hand sides begin with literal tokens. A matching sequence can complete a lexical production. If there are further constituents to match, it can begin a partial entry. This is one part of the extension that lets words and grammatical categories coexist within a production. A rule can get started from the actual words it requires, even when it needs a later nonterminal to finish.
Literal tokens can also appear after a nonterminal. When a partial entry is waiting for a literal, the parser checks the corresponding tokens directly. When it is waiting for a category, the parser looks for a completed entry of that category in the adjacent span. The result either becomes a new partial entry with more of the rule matched or becomes a completed entry. A completed constituent can in turn begin a rule whose first item is that category, including completing a parent rule that requires only the one child.
wᵢ₊ₘ:ᵢ₊ₙ = αₚ:ₚ₊ₙ₋ₘ
This is the terminal-matching condition in the algorithm. w is the input sequence, i is the start of the candidate span, n is its full length, and m is the length already covered by the partial entry. α is the sequence of items on the rule’s source side, and p marks the next position to match there. The notation with : gives slices bounded by the indicated positions. The + and − signs specify where those slices begin and end. The = requires the input slice for the new material to equal the corresponding literal sequence in the rule. If matching that material exhausts the rule, the algorithm can record completion.
The category [Nil] supplies the remaining extension. A lexical rule can classify a word as skippable. The parser can then extend a completed neighbor’s coverage across the skipped material while retaining the neighbor’s category and grammatical analysis. A chart entry can therefore cover the full stretch of input, including a word that contributes nothing to the calendar calculation. This differs from a literal such as of, which the outer week rule explicitly requires. Both can be absent as words in the target expression, but only the former is passed over under the special chart operation.
Following the chart through the week example
In the week of March 6, the numeric test recognizes 6 at index 4. The integer analysis can be promoted to a day category because the example grammar contains a rule that accepts the ranged integer in that role. Separate lexical matches recognize the as [Nil], week as a unit, and March as a month. These entries put the information needed for the larger analysis in the chart before the outer phrase has been recognized.
The unit match for week starts a partial time-span rule. At that point, the parser still needs the literal of and an embedded span. Independently, March starts the field rule that waits for a day. The two partial analyses concern different regions of the input. The chart can store them both and use each as soon as its next requirement is available.
P(1, 1) ∪= [TimeSpan] → [Unit] • of [TimeSpan]
P is the partial chart, and the two 1 indexes specify a span of length 1 starting at index 1. The operator ∪= adds the displayed analysis to that cell. [TimeSpan] to the left of → is the rule’s parent category, and the arrow introduces the source expansion. [Unit] has already matched week. The dot • marks the parser’s current position, with the literal of and the child [TimeSpan] still to be matched. The brackets distinguish the categories from the literal word.
The partial time-span rule advances when it encounters of at position 2. The example also shows how the parser reaches the same stage with coverage that starts one word earlier. The unit entry for week can absorb the adjacent [Nil] entry for the. This creates a unit analysis covering both words, which in turn starts the outer rule at the beginning of the phrase. Advancing that rule over of leaves it waiting for a time span in the same place as the analysis that started at week.
Meanwhile, the completed day analysis lets the parser finish the field pattern begun by March. The field constituent covers March 6. A rule with the field as its only source child lets the chart record a time span over the same words. This last step is important for composition. The outer rule asks for a time span, and the date phrase now supplies one, even though recognizing the date itself required assembling fields.
The inner span can finish the partial outer analysis beginning at week. In the next larger chart span, the completed outer analysis can absorb the. The partial analysis that already included the can also finish when it receives the embedded time span. The worked example thus shows two routes to a complete entry for the same outer production and full source span. The two routes concern where the initial skipped word is absorbed. They are distinct from the semantic ambiguity between the earlier and later interpretations of the March date.
C(|w|, 0)
C is the chart of completed analyses. w is the token sequence, so |w| specifies full input length. The 0 gives its first index. Parentheses contain the chart coordinates, and the comma separates length from start. This is the cell returned by the procedure. The target interpretation of a derivation in the cell follows from the paired rules and their alignments.
This example makes the division of responsibility between the chart and the temporal grammar visible. The chart establishes that the required material occurs in the right order and that all the input can be covered. The paired rules specify what to do with the constituents. For a completed source analysis, generating its associated target tree is deterministic. An expression can still yield more than one candidate because the grammar licenses more than one interpretation.
Evaluating the target tree and selecting a reading
For the earlier reading of the week example, the source analysis corresponds to the following operation.
FindEnclosing(FindEarlier(Present, MonthOfYear → 3, DayOfMonth → 6), Weeks)
FindEarlier takes Present as its reference span and searches for an earlier time matching the field assignments. MonthOfYear and DayOfMonth name the fields. Each → associates a field with its value. 3 is the month value for March, and 6 is the specified day within that month. FindEnclosing uses the result as its span argument and Weeks as its unit. Parentheses show the nesting, and commas separate arguments or field assignments within the relevant operation.
Evaluation proceeds through the nesting. The month and day conditions first identify the kind of date to look for. The earlier-date operation finds a span consistent with those conditions and the reference point. The outer operation then expands that span to the enclosing week. The target tree already distinguishes dates, fields, and units by the roles they play, so the outer operation can consume the inner result without having to recognize the original date wording again.
The grammar also supports a later-date analysis. The difference becomes a choice between available parses. The paper’s heuristics favor a time span over a period and an earlier time span over a later one. They also favor a span with Quarters granularity when the anchor itself has that granularity, a preference motivated by a recurring pattern in the TimeBank annotations. These rules select among analyses the grammar has already supplied. They cover choices about the type of result, its location relative to the reference, and its granularity.
The defaults can be followed on the paper’s examples. The day can yield an anchored day or a period measured in days, and the span preference favors the anchored interpretation. Monday can yield past and future candidates, and the direction preference favors the past. Context can make the other candidate appropriate, so these decisions have a different status from evaluating the resulting operations. Once a reading is fixed, the operators compute the value according to that reading. Choosing the reading depends on how the phrase is used.
How the English grammar was built
The grammar was developed manually by looking at examples in AQUAINT and TimeBank, following the development practice the paper describes for TIMEN and HeidelTime. The paper uses these corpora as the training corpora in its evaluation. Here, training means examining examples to construct the grammar. The production inventory and the selection heuristics are hand specified in the reported system.
Of the 354 rules, 192 are purely lexical. The mapping from seconds to the temporal unit Seconds is the paper’s example. A lexical rule of this sort handles a correspondence between wording and a target item. Rules for larger expressions can then use the unit category as part of a period or time-span construction. The inventory therefore includes knowledge tied to individual word forms and rules that specify how meanings combine.
Several parts of the method can account for different kinds of coverage. A lexical entry makes a word available. A mixed production establishes that the word can occur in a specific construction with other constituents. A target operation supplies the temporal relationship expressed by that construction. The calendar value eventually has to be written in the expected normalization form. The evaluation and error analysis make use of these distinctions because a missing expression pattern and a missing value form create different problems.
The paper names the released implementation and English grammar as bethard/timenorm on GitHub and identifies the official Maven Central release by its group info.bethard and artifact timenorm. The released components correspond to the parser and rule inventory described in the paper.
Experiments and results
What the evaluation measures
The experiment compares the synchronous grammar, abbreviated SCFG in the results, with TIMEN and HeidelTime. The task being scored is normalization accuracy over the time expressions. The score asks whether the system assigned the expected normalized value. The evaluation in the paper therefore focuses on the interpretation and value-production stages. A joint evaluation that also scores whether a system found the correct expression spans asks an additional question.
This distinction is particularly important for the result on the TempEval 2013 test set. The data come from that test set, but the paper’s figures measure normalization accuracy. The official TempEval 2013 figures discussed by the paper use an F1 evaluation involving finding and normalizing expressions. The paper accordingly treats the results of its own comparisons on these corpora as a separate set of measurements.
The corpora also play different roles in the evaluation. AQUAINT and TimeBank supplied the examples inspected during grammar development. They contain 652 and 1426 time expressions, respectively, in the paper’s evaluation. Timen and the TempEval 2013 test set are the test corpora, with 214 and 158 expressions, respectively. Results on the development corpora describe performance on material that helped shape the rules. The test corpora show how the same approach fares on other data, where the forms represented in the grammar may be a less complete fit.
The choice of comparators addresses the question raised by the paper’s account of earlier systems. TIMEN and HeidelTime both use direct lexical-pattern mappings, and the experiments ask how the paired grammar compares with these established rule-based approaches. The paper also tried to include the compositional method of Angeli and colleagues. The authors were able to run that implementation with help from its authors, but the systems they trained scored substantially below the earlier reported results. The paper therefore omits that comparison from its results.
Performance on the development corpora
On AQUAINT, the synchronous grammar attains normalization accuracy of 76.5. HeidelTime scores 74.7, and TIMEN scores 69.5. The three systems have the same ordering on TimeBank, where the grammar reaches 84.9, HeidelTime reaches 80.9, and TIMEN reaches 67.7. Because these corpora informed rule construction, the figures establish how effective the developed inventory is on those corpora, with the two direct-mapping systems providing the comparison.
Normalization accuracy on TimeBank
The synchronous grammar leads both direct-mapping systems on a corpus used to develop its rules.
The numbers
| System or setting | accuracy % |
|---|---|
| TIMEN | 67.7 |
| HeidelTime | 80.9 |
| Synchronous grammar (this paper) | 84.9 |
The development comparison matters partly because the grammar imposes structure on the expressions it covers. A high score requires that the distinctions drawn by the rules and operations be sufficient to produce the expected values. The TimeBank result includes the effect of the complete grammar and the selection defaults, including the preference for quarter granularity under the specified anchor condition. The experiment reports the score for the system as a whole. It leaves the separate contribution of that preference unmeasured.
There is also a difference between expressing a time relation and matching a corpus’s expected value conventions. A grammar inspected against examples can reflect both. The TimeBank and AQUAINT figures thus show that the implemented combination works on those inventories of expressions and annotations. The held-out corpora are where the paper can ask how well that combination travels beyond the material used to devise it.
Performance on the test corpora
The TempEval 2013 test set retains the ordering observed on the development corpora. The synchronous grammar scores 81.6, followed by HeidelTime at 78.5 and TIMEN at 74.1. This is a normalization comparison on the 158 expressions in the test set. The result shows that the lead over both direct-mapping systems also appears on a test corpus.
Normalization accuracy on the TempEval 2013 test set
The synchronous grammar scores highest when the comparison focuses on assigning values to time expressions.
The numbers
| System or setting | accuracy % |
|---|---|
| TIMEN | 74.1 |
| HeidelTime | 78.5 |
| Synchronous grammar (this paper) | 81.6 |
Timen gives a different ranking. TIMEN scores 67.8, the synchronous grammar 56.5, and HeidelTime 49.1. The grammar again leads HeidelTime, while TIMEN is strongest on this corpus. The difference in ranking gives the paper a reason to look at what the systems were asked to normalize. In particular, the item-level review identifies expected output forms that did not occur in the data inspected to develop the grammar.
Normalization accuracy on Timen
TIMEN leads on this corpus, with the synchronous grammar ahead of HeidelTime.
The numbers
| System or setting | accuracy % |
|---|---|
| HeidelTime | 49.1 |
| Synchronous grammar (this paper) | 56.5 |
| TIMEN | 67.8 |
The chart marks the proposed system, and the ordering shows where its result sits in the comparison. In prose, the overall pattern is consistent across the four corpora for one pair of systems. The synchronous grammar scores higher than HeidelTime on each. The comparison with TIMEN depends on the corpus. Both the synchronous grammar and HeidelTime score above TIMEN on AQUAINT, TimeBank, and the TempEval 2013 test set. TIMEN leads both on Timen.
Reading the corpus results together
Each score combines several kinds of time expression and several stages of the system. The grammar must account for the words and their construction. Its analysis must contain appropriate operations. Its selection heuristics must favor the intended interpretation, and the output must match the expected form. A result at corpus level reports the joint effectiveness of those stages. It cannot by itself associate success or failure with any one of them.
The test results show why the two held-out corpora are informative together. One reproduces the ordering from the rule-development corpora, while the other changes the result against TIMEN. Treating either one as representative of every evaluation would lose information available from the other. The paper’s strongest repeated comparison is the lead over HeidelTime. Its comparison with TIMEN is strongest when described corpus by corpus, because that preserves the setting in which TIMEN performed best.
The number of evaluated expressions specifies the scope of each measured result. The TimeBank result concerns a development corpus with 1426 expressions. The result on the TempEval 2013 test set concerns 158 expressions. These counts are useful alongside the accuracy scores because the corpora contribute separate evaluations with different amounts of material. The paper reports the four comparisons individually and uses the Timen disagreements to explain part of the variation.
What the ablations show
The paper presents no component ablation. Its closest evidence about why the system succeeds or fails is a manual analysis of 33 Timen expressions that TIMEN normalized correctly and the synchronous grammar normalized incorrectly. The systems were compared as complete implementations, so this analysis identifies the reported sources of failure in selected disagreements. It offers a different kind of evidence from changing a rule or parser feature and measuring the resulting accuracy.
Output forms absent during development
The largest group comprises 21 expressions whose expected normalization forms were absent from the development data. The paper found 19 instances of THH:MM:SS. In the development data, times were given in the date-bearing form YYYY-MM-DDTHH:MM:SS. The shorter form expresses a clock time without that date prefix. The review also found 2 instances of BCYYYY, whereas years in the development material used YYYY.
These errors show that coverage includes the required representation of the answer. The clock-time case, for example, differs from the conventions represented during development in whether a date accompanies the clock value. A normalizer can have machinery for hours, minutes, and seconds and still need the ability to return the format the reference specifies. The paper groups these cases by the missing forms. Its evidence leaves open how much of the required change would fall in the grammar, target interpretation, or subsequent rendering of a value.
This finding also qualifies what the Timen ranking tells us about composition. The largest group in the reviewed disagreements concerns expected output forms that the grammar’s development examples did not exhibit. The review gives a concrete source of mismatch between that development material and Timen. It does not test how the revised system would score if the new forms were covered, because the paper reports no such rerun.
Missing rules and wrong choices
The paper classifies 6 of the inspected errors as gaps in grammar coverage. The examples include season, every time, and long ago. These cases concern whether the grammar supplies the necessary analysis for an expression. A typed set of time operations helps organize meanings that the grammar can build. The source inventory still has to recognize the relevant vocabulary and constructions and connect them to an appropriate interpretation.
A further 4 errors are attributed to the selection heuristics. The example is Sept. 22, where the grammar selected an earlier occurrence and the correct reading in context was a later one. The failure is informative because it shows what can happen after a plausible analysis is available. The choice of past direction follows a system preference. It can yield a valid calendar value for one reading of the words even when the text calls for another reading.
These categories locate different problems in the interpretation pipeline. A coverage gap concerns the analyses available to select. An incorrect preference concerns how the available readings are ranked. The example of Sept. 22 gives a reason to use information beyond the expression when selecting a direction. The examples of missing expression coverage show where better ranking alone would leave the underlying problem in place.
The results do not isolate the frequency of either problem across the full evaluation. The review begins with the cases that one baseline solved and the proposed grammar missed. It is informative about that direction of disagreement, especially on the corpus where TIMEN leads. A broader analysis would need cases that both systems missed and cases that the grammar solved while TIMEN failed. The categories in the review cannot be treated as counts for those other sets.
Apparent errors in the reference annotations
The remaining 2 disagreements are attributed to human annotation. According to the paper’s reading of the annotation guidelines, several years ago should receive PXY, while the reference gives PAST_REF. The other example, daily, has the reference value XXXX-XX-XX, whereas the paper says the applicable value is P1D. The first dispute concerns how to represent an unspecified quantity of years in the expression. The second concerns a daily period.
These cases show how the expected values affect normalization accuracy. A system can produce a value the paper considers guideline-consistent and still be counted wrong against the recorded annotation. The review identifies the disagreements and explains the judgment about them. The reported corpus comparison remains the one scored against the existing references.
Taken together, the classifications connect errors to output coverage, source grammar coverage, parse selection, and annotation. That is more specific than the aggregate Timen score. The contribution of each parser extension remains unmeasured, however, as does the causal effect of composition relative to an otherwise matched direct rule system. The explanatory strength of the review lies in tracing particular outcomes to a likely point of failure.
Limitations
Limits the paper states
The paper identifies ambiguity resolution as an area for further work. Its preferences are fixed and use limited information about the expression and its anchor. An expression such as Monday gives a weekday, but the direction on the timeline can depend on the surrounding sentence. The paper gives the tense of a governing verb as an example of information that can help determine the intended direction.
The paper discusses a probabilistic grammar as a possible extension. Probabilities could assign different preferences to competing analyses. The stated problem is that a preference inferred from the phrase in isolation can still miss the reading required in a particular sentence. The authors therefore propose training a classifier to select among the parses using contextual features. The paper reports heuristic selection, and the proposed classifier remains a research direction.
The authors also delimit the comparison with prior systems. The earlier learned compositional approach was intended as a baseline, but the attempts to train it yielded substantially poorer performance than its original paper reported. Its omission means that the reported experiment establishes comparisons with TIMEN and HeidelTime. The paper’s comparison with Angeli and colleagues concerns the representational and grammatical differences it discusses, without a matched performance result.
Another stated limit is the meaning of the metric. The paper’s normalization accuracy describes whether supplied expressions received their expected values. Official TempEval 2013 evaluation also involves finding the expressions. The same test set can consequently support two different evaluation questions. The figures reported here answer the one about normalized values.
Limits visible in the design
The test results establish cross-corpus performance for one manually developed English grammar. English is the scope of the implemented grammar described in the paper. The source and target sides give a way to separate language-specific wording from shared operations. An implementation for another language would still need source rules, decisions about ambiguity, and an evaluation of the forms expected in its data. The reported experiments do not establish that transfer.
The manually developed inventory also puts the size of the rules in perspective. The figure of 354 rules identifies what the paper built, and the 192 purely lexical rules show how much of it consists of basic mappings. Those counts give no direct comparison of development time or maintenance effort. Compositional rules establish a mechanism for reuse. The paper does not quantify how many changes would be required to reach comparable coverage in the different systems or how much time their authors spend adding a new pattern.
The Timen errors reveal a practical boundary on the reported coverage. Reusable operations can compose analyses the grammar already supports. They leave room for mismatches when a test corpus introduces answer forms absent from the development examples. The paper’s clock-time and year examples make that limit specific to the evaluated implementation and data. The error review does not establish a corrected Timen result or show whether such a correction would preserve accuracy elsewhere.
The benchmark comparison changes several things at once. The SCFG has its own source inventory, target operators, parsing procedure, and heuristic choices. TIMEN and HeidelTime have their own rules and procedures for obtaining the expected values. A difference in accuracy is evidence about the complete systems as evaluated. The study leaves the individual effects of the synchronous formalism, the lexical rules, and the target operations unresolved. The worked derivation establishes how those components operate together without measuring their separate contributions.
The evaluation also leaves a gap between the grammar’s potential and the decisions of its heuristic selector. For an ambiguous expression, there may be a correct candidate among the parses even if the reported system selects an incorrect one. The paper gives examples of this situation in the error review. It does not report a separate score for whether the correct value is present anywhere among the candidates. Accordingly, the overall scores cannot establish how much accuracy could be recovered by improving selection with the rule inventory held fixed.
The same distinction runs in the other direction. A selection improvement can matter only for cases in which the grammar gives it an appropriate analysis to choose. The corpus comparisons include errors where construction of an analysis is the issue and others where the expected value form is absent. They therefore give limited evidence about the benefits of the proposed context classifier on its own. The paper’s examples motivate contextual selection, while its error breakdown indicates that this would address one of several observed sources of error.
The arithmetic and calendar semantics are illustrated through examples and the operator signatures. The paper gives a clear account of how the enclosing-week construction works and lists the forms the target grammar accepts. This makes it possible to follow the composition and see where types constrain it. The evaluation offers no separate breakdown of which operators account for the accuracy or which classes of nested expression are easiest to normalize. The corpus scores support the system’s overall performance, and the worked examples support the explanation of its mechanism.
Finally, the manual review is conditional on two systems making different decisions in a particular direction on one test corpus. That makes it well suited to investigating why TIMEN leads there. It leaves the grammar’s successful cases relative to TIMEN unclassified. A reader can use the review to understand the observed Timen failures that the paper examined, while the four corpus scores remain the evidence for the overall comparison.
What came after
A later citation appears in Exploiting Structure in Representation of Named Entities using Active Learning, published in 2018. The later paper’s stated subject is the use of active learning to exploit structure in named-entity representations. Bethard’s paper treats a related representational question in a narrower setting. It gives a time mention an internal structure whose parts can contribute different information to a normalized value.
The relationship can be stated at the level of that shared interest in structure. In Bethard’s method, a span of text can contain a unit, fields, a reference to another time, and a construction connecting those parts. The synchronous grammar represents the relationships explicitly and allows a larger expression to reuse a smaller interpretation. The later paper’s title places structure at the center of a study of named entities and associates it with active learning. The citation establishes a connection between the papers. The available account of the later study leaves its specific use of Bethard’s grammar, operators, and parser undetermined.
Bethard’s own proposal for contextual parse selection is a separate direction from that documented citation. The suggestion starts with the analyses the grammar constructs and asks how to choose among them using evidence in the sentence. It follows directly from errors such as selecting the earlier Sept. 22 when the later occurrence was intended. The paper leaves that proposal as future work, alongside demonstrated results for the manually written grammar and its heuristic selector.
Cite
Cite as Steven Bethard. 2013. A Synchronous Context Free Grammar for Time Normalization. Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{steven2013synchronous,
title = {{A Synchronous Context Free Grammar for Time Normalization}},
author = {Steven Bethard},
booktitle = {Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing},
year = {2013},
doi = {10.18653/v1/d13-1078},
url = {https://doi.org/10.18653/v1/d13-1078}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bethard-2013-synchronous-context-free-grammar-time/