Upload initial dataset files from '/home/christian/Desktop/Uni/Bachelor-Thesis/datasets/ctb'
Browse files- README.md +205 -0
- ctb_test.csv +0 -0
- ctb_train.csv +0 -0
- pair-classification/ctb_test.parquet +3 -0
- pair-classification/ctb_train.parquet +3 -0
- sequence-classification/ctb_test.parquet +3 -0
- sequence-classification/ctb_train.parquet +3 -0
- token-classification/ctb_test.parquet +3 -0
- token-classification/ctb_train.parquet +3 -0
README.md
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: mit
|
5 |
+
pretty_name: ctb
|
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
|
72 |
+
- B-Effect
|
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.
|
141 |
+
|
142 |
+
### 1. `sequence-classification` Config
|
143 |
+
|
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.",
|
158 |
+
"seq_label": 1
|
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>.",
|
178 |
+
"pair_label": 1
|
179 |
+
}
|
180 |
+
```
|
181 |
+
|
182 |
+
### 3. `token-classification` Config
|
183 |
+
|
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 |
+
```
|
ctb_test.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
ctb_train.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pair-classification/ctb_test.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2fb0ffd543624f95bb1fd7b9995045c06b3a990814d9fc41496a54b9b78ba01
|
3 |
+
size 39338
|
pair-classification/ctb_train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bd2a48c8a1fecfde9b68c1a2ae463bbc5016d6f182c272787b6caf239baf7f71
|
3 |
+
size 243809
|
sequence-classification/ctb_test.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bd9868c4fcd5251a6e969d62237a6a5c67343246b7483911b4c40e53f96e411f
|
3 |
+
size 27441
|
sequence-classification/ctb_train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55c24fb7da65812dd0e382386a70b824bcbe392a9eb23aa5214f4bcbe7c8ffa7
|
3 |
+
size 161754
|
token-classification/ctb_test.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e0018b4a699d59ae80c15a7ad22d2e4f88002d57698c4905ed911741e060de2
|
3 |
+
size 32923
|
token-classification/ctb_train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55914d95dade29c01d04d7ae533dd817e066fcbd3053dcca169ea1e5d17a4f0a
|
3 |
+
size 170144
|