ChristianHugD commited on
Commit
48c7abe
·
verified ·
1 Parent(s): 14527f5

Upload initial dataset files from '/home/christian/Desktop/Uni/Bachelor-Thesis/datasets/because'

Browse files
README.md CHANGED
@@ -1,87 +1,71 @@
1
  ---
2
  language:
3
  - en
4
- license:
5
- - mit
6
- pretty-name:
7
- - because
8
- task-categories:
9
- - sequence-classification
10
  - token-classification
11
  configs:
12
  - config_name: sequence-classification
13
  description: Data prepared for identifying the presence of a causal relation in a text.
14
- data_files: # Assuming your data files for this config are named like this
15
- - train.csv
16
- - test.csv
17
- features: # These are the features expected *by this config*
 
 
18
  - name: text
19
  dtype: string
20
- - name: seq_label
21
- dtype:
22
- class_label:
23
- names:
24
- '0': negative_causal_relation
25
- '1': positive_causal_relation
26
- task_templates: # Metadata for the Hub's display and task understanding
27
  - task: text-classification
28
  text_column: text
29
- labels_column: seq_label
30
  labels:
31
  - negative_causal_relation
32
  - positive_causal_relation
33
 
34
  - config_name: pair-classification
35
- description: Data prepared for classifying if two sequences have causal relationship.
36
  data_files:
37
- - train.csv
38
- - test.csv
39
- features:
40
- - name: text_w_pairs
 
 
41
  dtype: string
42
- - name: pair_label
43
- dtype:
44
- class_label:
45
- names:
46
- '0': negative_causal_relation
47
- '1': positive_causal_relation
48
  task_templates:
49
- - task: pair-classification
50
- text_column: text_w_pairs
51
- labels_column: pair_label
52
  labels:
53
  - negative_causal_relation
54
  - positive_causal_relation
55
 
56
  - config_name: token-classification
57
  description: Data prepared for span detection of Cause and Effect entities within text.
58
- data_files: # Assuming your data files for this config are named like this
59
- - train.csv
60
- - test.csv
61
- features: # These are the features expected *by this config*
62
- - name: text
63
- dtype: string
64
- - name: tokens # Tokenized version of text for aligning labels
65
  dtype:
66
- Sequence:
67
- feature:
68
- dtype: string
69
- - name: labels-BIO # The token-level ground truth labels (BIO tags)
70
  dtype:
71
- Sequence: # This indicates 'target' is a list/sequence of labels
72
- feature:
73
- class_label: # Each element in the sequence is a categorical label
74
- names:
75
- - O # Outside of any annotated causal span
76
- - B-Cause # Beginning of a Cause span
77
- - I-Cause # Inside a Cause span
78
- - B-Effect # Beginning of an Effect span
79
- - I-Effect # Inside an Effect span
80
- task_templates: # Metadata for the Hub's display and task understanding
81
  - task: token-classification
82
- text_column: tokens # For token classification, the input is typically tokens
83
- labels_column: labels-BIO
84
- entity_type_names:
85
  - O
86
  - B-Cause
87
  - I-Cause
@@ -89,75 +73,68 @@ configs:
89
  - I-Effect
90
  ---
91
 
92
-
93
- # Causality Extraction Dataset
94
-
95
- This repository contains the `Causality Extraction` dataset, designed for easy integration and loading within the Hugging Face ecosystem. It facilitates research and development in identifying causal relationships in text through three distinct configurations: **`sequence-classification`** (for presence of causality in a text), **`pair-classification`** (for classifying causal relationships between two identified text spans), and **`token-classification`** (for identifying causal spans).
96
-
97
- ---
98
-
99
  ## Table of Contents
100
 
101
- - [Causality Extraction Dataset](#causality-extraction-dataset)
102
- - [Table of Contents](#table-of-contents)
103
- - [Dataset Description](#dataset-description)
104
- - [What is this dataset about?](#what-is-this-dataset-about)
105
- - [Why was this dataset created?](#why-was-this-dataset-created)
106
- - [Who is the intended audience?](#who-is-the-intended-audience)
107
- - [Configurations Overview](#configurations-overview)
108
- - [1. `sequence-classification` Config](#1-sequence-classification-config)
109
- - [Key Columns](#key-columns)
110
- - [Data Instance Example](#data-instance-example)
111
- - [2. `pair-classification` Config](#2-pair-classification-config)
112
- - [Key Columns](#key-columns-1)
113
- - [Data Instance Example](#data-instance-example-1)
114
- - [3. `token-classification` Config](#3-token-classification-config)
115
- - [Key Columns](#key-columns-2)
116
- - [Data Instance Example](#data-instance-example-2)
117
  - [Data Splits](#data-splits)
118
- - [How to Load the Dataset](#how-to-load-the-dataset)
119
- - [Dataset Creation and Maintenance](#dataset-creation-and-maintenance)
120
- - [Source Data](#source-data)
121
- - [Annotations](#annotations)
122
- - [Preprocessing](#preprocessing)
123
- - [Maintenance Plan](#maintenance-plan)
124
- - [Considerations for Using the Dataset](#considerations-for-using-the-dataset)
125
- - [Bias and Limitations](#bias-and-limitations)
126
- - [Ethical Considerations](#ethical-considerations)
127
- - [Licensing](#licensing)
128
- - [Citations](#citations)
129
- - [Contact](#contact)
 
130
 
131
  ---
132
 
133
  ## Dataset Description
134
 
135
- ### What is this dataset about?
136
- This dataset contains text examples annotated for causal relations at different granularities. It provides:
137
- * A document-level label indicating the overall presence or absence of a causal relation within a text.
138
- * Annotations for classifying the relationship between two specific text spans (which may or may not be explicitly marked).
139
- * Token-level annotations (Cause/Effect spans) for extracting the specific components of causality.
140
 
141
- This multi-faceted approach allows for both coarse-grained and fine-grained causal analysis, supporting various research and application needs.
142
 
143
- ### Why was this dataset created?
144
- This dataset was created to support research and development in automated causal extraction. By providing multiple levels of annotation, it enables the training and evaluation of models for:
145
- * **Identifying if causality exists** in a given text (sequence-classification).
146
- * **Classifying specific causal relationships between identified or provided argument pairs** (pair-classification).
147
- * **Pinpointing the exact phrases** that represent causes and effects (token-classification).
148
 
149
- This comprehensive approach can facilitate advancements in areas like event understanding, scientific text analysis, legal document analysis, and more.
150
 
151
- ### Who is the intended audience?
152
- This dataset is intended for researchers and developers in Natural Language Processing (NLP) and Artificial Intelligence (AI) who are interested in:
153
- * Causal inference and extraction.
154
- * Text classification (especially for relation detection).
155
- * Token classification (e.g., Named Entity Recognition for causal spans).
156
- * Pair classification and relation extraction.
157
- * Multi-task learning approaches in NLP.
 
 
 
 
158
 
159
  ---
160
 
 
 
 
 
 
 
 
 
161
  ## Configurations Overview
162
 
163
  This dataset offers the following configurations, each tailored for a specific causal extraction task. You select the desired configuration when loading the dataset using `load_dataset()`. All configurations share the same underlying data files (`train.csv`, `validation.csv`, `test.csv`), but interpret specific columns for their respective tasks.
@@ -167,12 +144,14 @@ This dataset offers the following configurations, each tailored for a specific c
167
  This configuration provides text and a binary label indicating whether a causal relation is present in the text. It is designed for **sequence classification** tasks.
168
 
169
  #### Key Columns
170
- * `text`: `string` - The input text, representing the document or sentence to be classified. This serves as the **input feature** for models.
171
- * `seq_label`: `int` - The binary label indicating the presence (`1`) or absence (`0`) of a causal relation. This is the **target label** for classification.
172
- * `0`: `negative_causal_relation` (No causal relation detected)
173
- * `1`: `positive_causal_relation` (A causal relation is present)
 
174
 
175
  #### Data Instance Example
 
176
  ```json
177
  {
178
  "text": "We have gotten the agreement of the Chairman and the Secretary, preliminary to any opening statements, to stay until 1 p.m. We will probably have some votes, so we will maximize our time.",
@@ -180,18 +159,19 @@ This configuration provides text and a binary label indicating whether a causal
180
  }
181
  ```
182
 
183
-
184
  ### 2. `pair-classification` Config
185
 
186
  This configuration focuses on classifying the causal relationship between two pre-defined text spans within a larger text. It is designed for **pair-classification** tasks where the input often highlights the potential cause and effect arguments.
187
 
188
  #### Key Columns
189
- * `text_w_pairs`: `string` - The text where the potential causal arguments are explicitly marked (e.g., using special tags like `<ARG0>` and `<ARG1>`). This is the **input feature** for models.
190
- * `pair_label`: `int` - The binary label indicating whether the relationship between the marked pair is causal (`1`) or not (`0`). This is the **target label** for classification.
191
- * `0`: `negative_causal_relation` (No causal relation between the pair)
192
- * `1`: `positive_causal_relation` (A causal relation exists between the pair)
 
193
 
194
  #### Data Instance Example
 
195
  ```json
196
  {
197
  "text_w_pairs": "We have gotten the agreement of the Chairman and the Secretary, preliminary to any opening statements, to stay until 1 p.m. <ARG0>We will probably have some votes</ARG0>, so <ARG1>we will maximize our time</ARG1>.",
@@ -204,20 +184,22 @@ This configuration focuses on classifying the causal relationship between two pr
204
  This configuration provides pre-tokenized text and corresponding token-level labels (BIO tags) that mark the spans of Causes and Effects. It is suitable for **token classification** (span detection) tasks.
205
 
206
  #### Key Columns
207
- * `text`: `string` - The original raw text (provided for context).
208
- * `tokens`: `list[str]` - The pre-tokenized version of the `text`. This is the **input feature** for models.
209
- * `labels`: `list[int]` - A list of integer IDs, where each ID corresponds to a BIO tag for the respective token in the `tokens` list. This is the **target label** for span detection.
210
- * `0`: `O` (Outside of any annotated causal span)
211
- * `1`: `B-Cause` (Beginning of a Cause span)
212
- * `2`: `I-Cause` (Inside a Cause span)
213
- * `3`: `B-Effect` (Beginning of an Effect span)
214
- * `4`: `I-Effect` (Inside an Effect span)
 
215
 
216
  #### Data Instance Example
 
217
  ```json
218
  {
219
  "text": "The heavy rain caused flooding in the streets.",
220
  "tokens": ["The", "heavy", "rain", "caused", "flooding", "in", "the", "streets", "."],
221
  "labels": [0, 1, 2, 0, 3, 4, 4, 4, 0] # Example BIO tags for Cause "heavy rain" and Effect "flooding in the streets"
222
  }
223
- ```
 
1
  ---
2
  language:
3
  - en
4
+ license: mit
5
+ pretty_name: semeval2010t8
6
+ task_categories:
7
+ - text-classification
 
 
8
  - token-classification
9
  configs:
10
  - config_name: sequence-classification
11
  description: Data prepared for identifying the presence of a causal relation in a text.
12
+ data_files:
13
+ - split: train
14
+ path: sequence-classification/train.parquet
15
+ - split: test
16
+ path: sequence-classification/test.parquet
17
+ features:
18
  - name: text
19
  dtype: string
20
+ - name: label
21
+ dtype: int64
22
+ task_templates:
 
 
 
 
23
  - task: text-classification
24
  text_column: text
25
+ label_column: label
26
  labels:
27
  - negative_causal_relation
28
  - positive_causal_relation
29
 
30
  - config_name: pair-classification
31
+ description: Data prepared for classifying if two sequences have a causal relationship.
32
  data_files:
33
+ - split: train
34
+ path: pair-classification/train.parquet
35
+ - split: test
36
+ path: pair-classification/test.parquet
37
+ features:
38
+ - name: text
39
  dtype: string
40
+ - name: label
41
+ dtype: int64
 
 
 
 
42
  task_templates:
43
+ - task: text-classification
44
+ text_column: text
45
+ label_column: label
46
  labels:
47
  - negative_causal_relation
48
  - positive_causal_relation
49
 
50
  - config_name: token-classification
51
  description: Data prepared for span detection of Cause and Effect entities within text.
52
+ data_files:
53
+ - split: train
54
+ path: token-classification/train.parquet
55
+ - split: test
56
+ path: token-classification/test.parquet
57
+ features:
58
+ - name: tokens
59
  dtype:
60
+ sequence: string
61
+ - name: labels
 
 
62
  dtype:
63
+ sequence: int64
64
+ task_templates:
 
 
 
 
 
 
 
 
65
  - task: token-classification
66
+ text_column: tokens
67
+ label_column: labels
68
+ labels:
69
  - O
70
  - B-Cause
71
  - I-Cause
 
73
  - I-Effect
74
  ---
75
 
 
 
 
 
 
 
 
76
  ## Table of Contents
77
 
78
+ - [Dataset Description](#dataset-description)
79
+ - [Dataset Summary](#dataset-summary)
80
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
81
+ - [Languages](#languages)
82
+ - [Dataset Structure](#dataset-structure)
83
+ - [Data Instances](#data-instances)
84
+ - [Data Fields](#data-fields)
 
 
 
 
 
 
 
 
 
85
  - [Data Splits](#data-splits)
86
+ - [Dataset Creation](#dataset-creation)
87
+ - [Curation Rationale](#curation-rationale)
88
+ - [Source Data](#source-data)
89
+ - [Annotations](#annotations)
90
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
91
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
92
+ - [Social Impact of Dataset](#social-impact-of-dataset)
93
+ - [Limitations and Biases](#limitations-and-biases)
94
+ - [Additional Information](#additional-information)
95
+ - [Dataset Curators](#dataset-curators)
96
+ - [Licensing Information](#licensing-information)
97
+ - [Citation Information](#citation-information)
98
+ - [Contributions](#contributions)
99
 
100
  ---
101
 
102
  ## Dataset Description
103
 
104
+ ### Dataset Summary
105
+
106
+ This dataset is derived from the SemEval-2010 Task 8: **"Identifying the Cause-Effect Relation in Text"**. It focuses on identifying and classifying causal relationships between entities in sentences. The original task aimed to promote research in relation extraction, specifically focusing on the detection and classification of semantic relations between pairs of nominals.
 
 
107
 
108
+ This particular version provides the data in a ready-to-use CSV format with three configurations tailored for common NLP tasks:
109
 
110
+ - **`sequence-classification`**: For classifying the presence of a causal relation at the sentence level.
111
+ - **`pair-classification`**: For classifying the causal relationship between specific entity pairs within text (potentially using text with marked pairs).
112
+ - **`token-classification`**: For detecting and labeling "Cause" and "Effect" entities as spans within text (e.g., using IOB format).
 
 
113
 
114
+ ### Supported Tasks and Leaderboards
115
 
116
+ This dataset can be used to train and evaluate models for:
117
+
118
+ - **Text Classification**: For determining if a sentence expresses a causal relationship (`sequence-classification` config).
119
+ - **Relation Extraction / Text Classification**: For classifying the type of relationship between two marked nominals (`pair-classification` config).
120
+ - **Named Entity Recognition (NER) / Token Classification**: For identifying and tagging cause and effect entities within sentences (`token-classification` config).
121
+
122
+ Given its origin, it's suitable for benchmarking performance on relation extraction tasks. You might find relevant leaderboards on the original SemEval-2010 Task 8 website or other platforms dedicated to relation extraction.
123
+
124
+ ### Languages
125
+
126
+ The dataset is entirely in **English (en)**.
127
 
128
  ---
129
 
130
+ ## Dataset Structure
131
+
132
+ ### Data Instances
133
+
134
+ Each instance in the dataset typically represents a sentence or a segment of text with associated labels. For the `token-classification` setup, sentences are tokenized.
135
+
136
+ Here's an example for the `token-classification` config:
137
+
138
  ## Configurations Overview
139
 
140
  This dataset offers the following configurations, each tailored for a specific causal extraction task. You select the desired configuration when loading the dataset using `load_dataset()`. All configurations share the same underlying data files (`train.csv`, `validation.csv`, `test.csv`), but interpret specific columns for their respective tasks.
 
144
  This configuration provides text and a binary label indicating whether a causal relation is present in the text. It is designed for **sequence classification** tasks.
145
 
146
  #### Key Columns
147
+
148
+ - `text`: `string` - The input text, representing the document or sentence to be classified. This serves as the **input feature** for models.
149
+ - `seq_label`: `int` - The binary label indicating the presence (`1`) or absence (`0`) of a causal relation. This is the **target label** for classification.
150
+ - `0`: `negative_causal_relation` (No causal relation detected)
151
+ - `1`: `positive_causal_relation` (A causal relation is present)
152
 
153
  #### Data Instance Example
154
+
155
  ```json
156
  {
157
  "text": "We have gotten the agreement of the Chairman and the Secretary, preliminary to any opening statements, to stay until 1 p.m. We will probably have some votes, so we will maximize our time.",
 
159
  }
160
  ```
161
 
 
162
  ### 2. `pair-classification` Config
163
 
164
  This configuration focuses on classifying the causal relationship between two pre-defined text spans within a larger text. It is designed for **pair-classification** tasks where the input often highlights the potential cause and effect arguments.
165
 
166
  #### Key Columns
167
+
168
+ - `text_w_pairs`: `string` - The text where the potential causal arguments are explicitly marked (e.g., using special tags like `<ARG0>` and `<ARG1>`). This is the **input feature** for models.
169
+ - `pair_label`: `int` - The binary label indicating whether the relationship between the marked pair is causal (`1`) or not (`0`). This is the **target label** for classification.
170
+ - `0`: `negative_causal_relation` (No causal relation between the pair)
171
+ - `1`: `positive_causal_relation` (A causal relation exists between the pair)
172
 
173
  #### Data Instance Example
174
+
175
  ```json
176
  {
177
  "text_w_pairs": "We have gotten the agreement of the Chairman and the Secretary, preliminary to any opening statements, to stay until 1 p.m. <ARG0>We will probably have some votes</ARG0>, so <ARG1>we will maximize our time</ARG1>.",
 
184
  This configuration provides pre-tokenized text and corresponding token-level labels (BIO tags) that mark the spans of Causes and Effects. It is suitable for **token classification** (span detection) tasks.
185
 
186
  #### Key Columns
187
+
188
+ - `text`: `string` - The original raw text (provided for context).
189
+ - `tokens`: `list[str]` - The pre-tokenized version of the `text`. This is the **input feature** for models.
190
+ - `labels`: `list[int]` - A list of integer IDs, where each ID corresponds to a BIO tag for the respective token in the `tokens` list. This is the **target label** for span detection.
191
+ - `0`: `O` (Outside of any annotated causal-span)
192
+ - `1`: `B-Cause` (Beginning of a Cause span)
193
+ - `2`: `I-Cause` (Inside a Cause span)
194
+ - `3`: `B-Effect` (Beginning of an Effect span)
195
+ - `4`: `I-Effect` (Inside an Effect span)
196
 
197
  #### Data Instance Example
198
+
199
  ```json
200
  {
201
  "text": "The heavy rain caused flooding in the streets.",
202
  "tokens": ["The", "heavy", "rain", "caused", "flooding", "in", "the", "streets", "."],
203
  "labels": [0, 1, 2, 0, 3, 4, 4, 4, 0] # Example BIO tags for Cause "heavy rain" and Effect "flooding in the streets"
204
  }
205
+ ```
pair-classification/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edf5f00de947a1fe786046d8b36bb5950c2f6277dc0e359d93acef88f5d6783d
3
+ size 4764
pair-classification/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46ab0de8b28c419206d8142563a2b4eda3038120cf33def259aeacb20d1cce69
3
+ size 63667
sequence-classification/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:807af4db2d74a317e1a33e2e8951c96d92663e3d9057356bd2ad8c78eb54328d
3
+ size 4294
sequence-classification/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c04df3996e5278fc69aee7c70501a4bb55fdf76060999f671da2a5036122668e
3
+ size 48725
token-classification/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b925e8b783efe58415c889946f4eab3f09194a2f697250e63dcb68919fbf17f
3
+ size 4921
token-classification/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ea99e4bbcd3acdb661f2205865a8e234df5f3f82a284395bff49edba5e13f6e
3
+ size 61850