Introduction
Building formal grammars—the rulebooks that define how a language is structured—remains a significant bottleneck in Natural Language Processing (NLP). Researchers often face a "trilemma": a grammar formalism must be expressive enough to capture complex linguistic rules, readable enough for humans to maintain, and efficient enough for a computer to process. Furthermore, many existing tools are "locked in" to specific frameworks, making linguistic resources difficult to port between systems.
This paper introduces a modular toolchain designed to help linguists and computer scientists build large-scale, formal grammars and lexicons. By leveraging Interaction Grammars (IGs) and a "metagrammar" approach, the system allows for the creation of highly reusable linguistic resources that are both human-readable and computationally efficient.
The Toolchain Architecture
The proposed system separates high-level linguistic descriptions from the low-level "object grammars" used by parsers. The toolchain consists of four primary stages, as illustrated in the workflow below.
1. XMG (eXtensible MetaGrammar)
Instead of manually writing thousands of individual rules, linguists define "fragments" of syntax. XMG compiles these fragments into a full "object grammar." This metagrammar approach solves the "maintenance nightmare"; for example, changing subject-verb agreement rules requires editing a single fragment rather than thousands of individual lexical entries.
2. Lexicon Anchoring
The system connects the abstract object grammar to a real-world lexicon through a generic interface. This design promotes framework agnosticism, allowing linguistic data to be potentially reused across different formalisms, such as Tree Adjoining Grammars (TAGs).
3. Lexical Disambiguation
This module utilizes the "polarity" principle inherent in Interaction Grammars. In this model, linguistic structures have positive or negative polarities that must "neutralize" each other for a sentence to be well-formed. By checking global neutrality, the system can quickly filter out impossible word combinations, significantly reducing the search space before the heavy lifting of parsing begins.
4. LEOPAR Parser
The LEOPAR parser processes the filtered selections to produce final parse trees. It includes a graphical interface, enabling linguists to manually inspect and debug the parsing process in real-time.
Evaluation and Results
The toolchain was evaluated using the TSNLP (Test Suite for Natural Language Processing), a standard benchmark for testing the coverage and accuracy of grammatical systems. Two grammars were tested:
- French IG: A large-scale grammar covering standard constructions like negation, coordination, and long-distance dependencies. It consists of over 2,000 syntactic structures generated from 455 high-level classes. It successfully parsed 88% of correct sentences and correctly rejected 85% of ungrammatical ones.
- English IG: A preliminary version developed to test the toolchain's modularity. Despite being in early development, it achieved an 85% parse rate for grammatical sentences and an 84% rejection rate for ungrammatical ones.
Discussion and Future Work
A key insight of this work is the use of polarity as a global filter. If a sentence lacks a balance of positive and negative "charges" for specific features, the system discards the interpretation immediately without attempting to build a tree. This symbolic approach ensures high precision and efficiency.
However, the authors acknowledge that the current system is purely symbolic. Future work involves integrating statistical models to handle "noisy" real-world data more robustly and incorporating semantic layers (meaning) into the metagrammar. The ultimate goal is to scale the system to parse large, raw corpora across multiple languages.
Summary updated