A Synchronous Context Free Grammar for Time Normalization

Steven Bethard

Introduction

Time normalization is the process of converting natural language temporal expressions—such as "the day before yesterday" or "last Wednesday"—into standardized formats like 2013-04-12. This task is essential for information extraction but remains challenging due to the inherent ambiguity and variety of human language.

Most traditional systems rely on "flat" string-to-string rules. For instance, a system might have one rule for "yesterday" and an entirely separate rule for "the day before yesterday." This approach fails to capture the compositional nature of language, where complex expressions are built from smaller, reusable temporal concepts. Furthermore, these rigid systems often struggle with "filler" words like "the" or "of" that do not carry temporal weight.

Methodology: Synchronous Context Free Grammar (SCFG)

The authors propose a compositional approach using a Synchronous Context Free Grammar (SCFG). Unlike standard grammars that simply parse a sentence, an SCFG builds two trees simultaneously: one representing the source English text and another representing a target "language" of formal temporal operators.

Figure 2: Synchronous parse trees for the phrase "the week of March 6," mapping English tokens to formal temporal operators.

Key Components

  • Temporal Operators: The grammar maps text to functions such as FINDEARLIER, FINDENCLOSED, or STARTATENDOF. For example, "today" is logically defined as the day that encloses the present moment.
  • Extended CYK+ Parsing: The authors modified the standard CYK algorithm to handle dynamic integer generation (e.g., for dates like "March 6"), non-binary rules, and [NIL] tokens. These [NIL] tokens allow the grammar to gracefully ignore words like "the" or "of" that are grammatically necessary but logically empty in a temporal context.
  • Disambiguation Heuristics: To resolve ambiguities—such as whether "Monday" refers to the past or future—the system employs simple tie-breaking rules, generally preferring earlier timespans.

Evaluation and Results

The system was evaluated across four major time normalization corpora: AQUAINT, TimeBank, Timen, and TempEval 2013. The grammar was manually developed based on patterns found in the AQUAINT and TimeBank datasets.

Figure 5: Performance comparison (Accuracy) of the SCFG approach against TIMEN and HeidelTime across four benchmarks.

The SCFG approach consistently outperformed HeidelTime, the previous state-of-the-art system from the TempEval 2013 competition. It also surpassed the TIMEN system on three of the four corpora. These results suggest that a well-constructed grammar generalizes more effectively than a massive collection of flat, string-matching rules.

Key Insights and Future Work

The success of this approach highlights that compositionality is key. By treating time normalization as a translation task between English and Temporal Logic, the system can handle nested, complex expressions that flat systems miss. Defining relative terms like "yesterday" via logic (e.g., SHIFTLEFT(TODAY, 1 DAY)) rather than as primitive constants ensures internal consistency.

However, limitations remain. The current grammar was constructed manually; future iterations could utilize Probabilistic SCFGs to learn rules or weights from data. Additionally, the current disambiguation heuristics are basic; incorporating context-aware classifiers (e.g., analyzing verb tense) could improve accuracy for ambiguous terms like "Monday." Finally, expanding coverage for idiomatic phrases like "long ago" remains an area for future development.

Source Code: The authors have released their code and English grammar at github.com/bethard/timenorm.

Summary updated

BibTeX
@inproceedings{bethard2013synchronous,
  author = {Steven Bethard},
  title = {{A Synchronous Context Free Grammar for Time Normalization}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2013},
  doi = {10.18653/v1/d13-1078},
}
Figure