HHansi commited on
Commit
36c3f33
·
verified ·
1 Parent(s): 1dab3a7

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +98 -0
README.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ ---
5
+
6
+ # CODE-ACCORD: A Corpus of Building Regulatory Data for Rule Generation towards Automatic Compliance Checking
7
+
8
+ 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.
9
+
10
+ ## Data Annotation
11
+
12
+ 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.
13
+
14
+ Four categories were considered for entity annotation:
15
+ (1) object,
16
+ (2) property,
17
+ (3) quality and
18
+ (4) value.
19
+ The relations annotations span in ten categories:
20
+ (1) selection,
21
+ (2) necessity,
22
+ (3) part-of,
23
+ (4) not-part-of,
24
+ (5) greater,
25
+ (6) greater-equal,
26
+ (7) equal,
27
+ (8) less-equal,
28
+ (9) less and
29
+ (10) none.
30
+ 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.
31
+
32
+ ### Data Splits
33
+
34
+ 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.
35
+
36
+ ### Entities
37
+
38
+ The format of an entity data file is as follows:
39
+
40
+ | Attribute | Description |
41
+ |-------------------|--------------------------------------------------------------------------------|
42
+ | example_id | Unique ID assigned for each sentence |
43
+ | content | Original textual content of the sentence |
44
+ | processed_content | Tokenised (using NLTK's word_tokenize package) textual content of the sentence |
45
+ | label | Entity labelled sequence in IOB format |
46
+ | metadata | Additional information of sentence (i.e. original approved document from which the sentence is extracted) |
47
+
48
+
49
+ #### Using Data
50
+
51
+ The train and test splits of entity-annotated data can be loaded into Pandas DataFrames using the following Python code.
52
+
53
+ ```python
54
+ from datasets import Dataset
55
+ from datasets import load_dataset
56
+
57
+ train = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Entities', split='train'))
58
+ test = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Entities', split='test'))
59
+ ```
60
+
61
+ ### Relations
62
+
63
+ The format of a relation data file is as follows:
64
+
65
+
66
+ | Attribute | Description |
67
+ |-----------------|--------------------------------------------------------------------------------|
68
+ | example_id | Unique ID assigned for each sentence |
69
+ | content | Original textual content of the sentence |
70
+ | metadata | Additional information of sentence (i.e. original approved document from which the sentence is extracted) |
71
+ | tagged_sentence | Sentence with tagged entity pair |
72
+ | relation_type | Category of the relation in between the tagged entity pair |
73
+
74
+
75
+ #### Using Data
76
+
77
+ The train and test splits of relation-annotated data can be loaded into Pandas DataFrames using the following Python code.
78
+
79
+ ```python
80
+ from datasets import Dataset
81
+ from datasets import load_dataset
82
+
83
+ train = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Relations', split='train'))
84
+ test = Dataset.to_pandas(load_dataset('ACCORD-NLP/CODE-ACCORD-Relations', split='test'))
85
+ ```
86
+
87
+ ## Citation
88
+
89
+ More details about data annotation, statistics, and distribution are available in the following paper.
90
+
91
+ ```
92
+ @article{hettiarachchi2024code,
93
+ title={{CODE-ACCORD}: A Corpus of Building Regulatory Data for Rule Generation towards Automatic Compliance Checking},
94
+ 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 others},
95
+ journal={arXiv preprint arXiv:2403.02231},
96
+ year={2024}
97
+ }
98
+ ```