Datasets:

Modalities:
Text
Formats:
csv
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
pandas
HHansi's picture
Update README.md
955f3d8 verified
---
language:
- en
---
# CODE-ACCORD: A Corpus of Building Regulatory Data for Rule Generation towards Automatic Compliance Checking
The CODE-ACCORD corpus contains annotated sentences from the building regulations of England and Finland and has been developed as part of the Horizon European project for Automated Compliance Checks for Construction, Renovation or Demolition Works ([ACCORD](https://accordproject.eu/)). The corpus is in English, and it consists of both the English Building Regulations and the English translation of the Finnish National Building Code.
## Data Annotation
CODE-ACCORD is mainly focused on extracting information from text to support rule generation. There are two key types of information found in the text: named entities and relations, which are essential for comprehending the ideas conveyed in natural language. Hence, this dataset primarily focused on annotating entities and relations.
Four categories were considered for entity annotation:
(1) object,
(2) property,
(3) quality and
(4) value.
The relations annotations span in ten categories:
(1) selection,
(2) necessity,
(3) part-of,
(4) not-part-of,
(5) greater,
(6) greater-equal,
(7) equal,
(8) less-equal,
(9) less and
(10) none.
Please refer to our [Annotation Stragety](https://github.com/Accord-Project/CODE-ACCORD/blob/main/annotated_data/Annotation_Strategy_V1.0.0.pdf) for more details about the categories and sample annotations.
### Data Splits
Both entity and relation-annotated data consist of two data splits named *train* and *test*. The train split forms 80% of the full dataset, while the remaining 20% belongs to the test split.
### Entities
The format of an entity data file is as follows:
| Attribute | Description |
|-------------------|--------------------------------------------------------------------------------|
| example_id | Unique ID assigned for each sentence |
| content | Original textual content of the sentence |
| processed_content | Tokenised (using NLTK's word_tokenize package) textual content of the sentence |
| label | Entity labelled sequence in IOB format |
| metadata | Additional information of sentence (i.e. original approved document from which the sentence is extracted) |
#### Using Data
The train and test splits of entity-annotated data can be loaded into Pandas DataFrames using the following Python code.
```python
from datasets import Dataset
from datasets import load_dataset
train = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Entities', split='train'))
test = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Entities', split='test'))
```
### Relations
The format of a relation data file is as follows:
| Attribute | Description |
|-----------------|--------------------------------------------------------------------------------|
| example_id | Unique ID assigned for each sentence |
| content | Original textual content of the sentence |
| metadata | Additional information of sentence (i.e. original approved document from which the sentence is extracted) |
| tagged_sentence | Sentence with tagged entity pair |
| relation_type | Category of the relation in between the tagged entity pair |
#### Using Data
The train and test splits of relation-annotated data can be loaded into Pandas DataFrames using the following Python code.
```python
from datasets import Dataset
from datasets import load_dataset
train = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Relations', split='train'))
test = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Relations', split='test'))
```
## Citation
More details about data annotation, statistics, and distribution are available in the following paper.
```
@article{hettiarachchi2024code,
title={{CODE-ACCORD}: A Corpus of Building Regulatory Data for Rule Generation towards Automatic Compliance Checking},
author={Hettiarachchi, Hansi and Dridi, Amna and Gaber, Mohamed Medhat and Parsafard, Pouyan and Bocaneala, Nicoleta and Breitenfelder, Katja and Costa, Gon{\c{c}}al and Hedblom, Maria and Juganaru-Mathieu, Mihaela and Mecharnia, Thamer and Park, Sumee and Tan, He and Tawil, Abdel-Rahman H. and Vakaj, Edlira},
journal={arXiv preprint arXiv:2403.02231},
year={2024},
url={https://arxiv.org/abs/2403.02231}
}
```