Semi-Automated Labeling of Requirement Datasets for Relation Extraction

Jeremias Bohn, Jannik Fischbach, Martin Schmitt, Hinrich Schütze, Andreas Vogelsang

Abstract

Jeremias Bohn, Jannik Fischbach, Martin Schmitt, Hinrich Schütze, Andreas Vogelsang. Proceedings of the 14th Workshop on Building and Using Comparable Corpora (BUCC 2021).

2021.

Introduction

In Natural Language Processing (NLP), specialized domains like Requirements Engineering (RE) often lack the large-scale labeled datasets available for general tasks. Extracting structured relations from software specifications is critical for automation, yet manual labeling remains a significant bottleneck. It is time-consuming, expensive, and subject to human inconsistency. This paper proposes a semi-automated framework to bridge this gap by leveraging dependency parsing and handcrafted syntactic rules to generate consistent labels for requirement datasets.

Methodology

The authors developed a pipeline to transform raw requirement text into structured relational data using a syntax-driven approach.

  1. Preprocessing: The PURE dataset was cleaned to handle complex structures like enumerations, ensuring sentences were grammatically standard for the parser.
  2. Dependency Parsing: The Neural Adobe-UCSD Parser was employed to generate dependency trees, mapping the grammatical relationships between words.
  3. Pattern Matching: The core of the system consists of 102 handcrafted patterns. These rules map specific syntactic structures (e.g., a root verb and its nominal subject) to relational roles.
  4. Labeling Schema: The system identifies four primary components:
  5. ent1: The acting entity (subject).
  6. rel: The action or relation (verb).
  7. ent2: The passive entity (object).
  8. cond: Modifiers or conditions.
Examples of labeled requirement sentences showing entities, relations, and conditions.

Evaluation and Results

The framework was evaluated against a "gold standard" of 199 manually labeled sentences from a total corpus of 2,093 sentences. Performance was measured using Cohen’s Kappa ($\kappa$) to assess agreement between the automated system and human experts.

The system achieved an overall sentence average $\kappa$ of 0.632, indicating "substantial agreement." Performance varied significantly by label type:

  • Acting Entity (ent1): Achieved the highest agreement ($\kappa = 0.855$), as subjects are typically well-defined in dependency trees.
  • Conditions (cond): Proved the most challenging ($\kappa = 0.532$) due to their linguistic diversity and varied placement within sentences.
Agreement scores (Cohen’s Kappa) between the automated system and human annotators.

Discussion

A key insight of this work is that in the highly structured language of software requirements, syntax serves as a reliable proxy for semantics. By defining abstract rules rather than keyword-based filters, the system ensures high consistency and eliminates the subjective noise inherent in human labeling. Furthermore, because the framework utilizes Universal Dependencies, it is potentially adaptable to other languages with similar subject-verb-object structures.

Limitations and Future Work

Despite its success, the current system is limited to identifying a single primary relation per sentence and is highly dependent on the accuracy of the underlying dependency parser. Future research will focus on implementing recursive patterns for nested clauses and using the generated datasets to train more flexible Transformer-based models like BERT.

Summary updated

BibTeX
@inproceedings{bohn2021semi,
  author = {Jeremias Bohn and Jannik Fischbach and Martin Schmitt and Hinrich Schütze and Andreas Vogelsang},
  title = {{Semi-Automated Labeling of Requirement Datasets for Relation Extraction}},
  booktitle = {BUCC@RANLP},
  year = {2021},
  url = {https://openreview.net/forum?id=95zY7Lf01c_},
}
Figure