arXiv:2608.23448cs.CLAug 2026

Manuscript Offprint

arXiv:2608.23448

How Useful are LLMs for Grammar Engineering? Cantonese ParGram Resources and Controlled Experimental Evaluation with English Baselines

Chit-Fung Lam

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

This paper presents new Cantonese Par-Gram resources and evaluates LLMs for knowledge-driven grammar engineering within a controlled experimental paradigm. Using Cantonese ParGram resources as gold standards, with corresponding English baselines, we investigate whether OpenAI's gpt-oss-120b and GPT-5.4 can generate machine-processable grammars from sentences and target formal structures under systematically varied prompting conditions. GPT-5.4 outperformed gpt-oss-120b, while grammars generated from target formal structures generally outperformed those generated from sentences. Although both models could generate locally plausible phrase-structure rules, lexical entries, and templates, they often struggled to coordinate interacting formal constraints, especially in multi-construction settings. The results characterize both the capabilities and limitations of current LLMs for potential integration into AI-assisted expert workflows: LLMs may support intermediate stages of grammar development, but human linguistic expertise remains central to analysis, validation, and refinement. The study also contributes new Cantonese symbolic grammatical resources.

1 Introduction

Grammar engineering involves the design and computational implementation of formal grammars (Bender, 2008; Duchier and Parmentier, 2015). Within the Parallel Grammar (ParGram) Project (Butt et al., 1999, 2002; Sulger et al., 2013), broad-coverage grammars are developed in parallel across languages using the Lexical–Functional Grammar (LFG) formalism (Bresnan et al., 2016; Dalrymple et al., 2019) as computationally implemented in Xerox Linguistic Environment (XLE) (Crouch et al., 2011). These grammars then generate parsebanks containing c(onstituent)-structures and f(unctional)-structures (Section 2.2), collectively forming the ParGramBank system. ParGram treebanks are pure parsebanks in that they are generated automatically by parsing sentences using their respective LFG/XLE grammars, without ad hoc corrections or manual annotation (Rosén, 2023).

The purpose of this paper is twofold:

  1. It presents new Cantonese treebank resources as part of the ParGram Project;

  2. It presents a controlled experimental evaluation of the capabilities and limitations of current LLMs in supporting knowledge-driven grammar engineering, using Cantonese Par-Gram resources as gold standards with corresponding English baseline conditions.

For the second objective, we evaluate the extent to which large language models (LLMs) can create XLE-style phrase structure rules, functional annotations, templates, and lexical entries required for XLE grammars (Crouch et al., 2011). Our experiments are motivated by recent interest in grammar creation using LLMs (Spencer and Kongborrirak, 2025) and the potential incorporation of LLMs into traditional grammar engineering workflows (Lam and Uí Dhonnchadha, 2026).

Knowledge-driven grammar engineering typically requires substantial manual effort as well as expertise in both linguistic formalism and computational implementation (Duchier and Parmentier, 2015). LLMs can potentially reduce the grammar engineering costs by assisting with rule generation, lexical specification, and structural generalization across languages. However, it remains unclear how useful current LLMs are in generating grammars that are linguistically adequate, formally accurate, and computationally usable within existing symbolic grammar engineering pipelines (Lam and Uí Dhonnchadha, 2026). To address these questions, we conducted experiments using Ope-nAI's gpt-oss-120b and GPT-5.4 with prompting strategies based on one-shot in-context learning (Brown et al., 2020). Our evaluation focused on the structural validity, linguistic adequacy, and formal accuracy of the generated grammars.

The study adopts a controlled experimental paradigm rather than attempting to reproduce end-to-end development of a mature ParGram grammar. We systematically vary the source of grammatical information, the scope of grammar generation, and the language model while holding the remaining aspects of the experimental setting constant. Here, ‘usefulness’ is operationalized in terms of rule-level formal accuracy, parse-level structural quality, and error patterns under these controlled conditions, rather than end-to-end development efficiency. This design allows us to characterize where current LLMs succeed and fail in symbolic grammar generation and what these patterns imply for AI-assisted, expert-led grammar-engineering workflows.