Tim Hagen commited on
Commit
070fbfd
·
1 Parent(s): cf916ef

Add converted parquet files and update conversion script

Browse files
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: cc-by-4.0
3
  task_categories:
4
  - text-classification
5
  language:
@@ -81,7 +81,7 @@ train-eval-index:
81
  ---
82
 
83
  > [!NOTE]
84
- > This repository integrates the EventStoryLine (ESL) corpus into hf datasets. It is in conformance with ESL's CC BY 4.0 license. Please find the original dataset
85
  > [here](https://github.com/cltl/EventStoryLine). We used the [UniCausal](https://github.com/tanfiona/UniCausal/tree/main/data/splits) reformatting of the data (referred to as `esl2`) as the basis
86
  > for this repository. Please see the [citations](#citations) at the end of this README.
87
 
 
1
  ---
2
+ # license: cc-by-4.0 # TODO: verify — https://github.com/cltl/EventStoryLine
3
  task_categories:
4
  - text-classification
5
  language:
 
81
  ---
82
 
83
  > [!NOTE]
84
+ > This repository integrates the EventStoryLine (ESL) corpus into hf datasets. Please find the original dataset
85
  > [here](https://github.com/cltl/EventStoryLine). We used the [UniCausal](https://github.com/tanfiona/UniCausal/tree/main/data/splits) reformatting of the data (referred to as `esl2`) as the basis
86
  > for this repository. Please see the [citations](#citations) at the end of this README.
87
 
causality-detection/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:117fd061e4ef4a0174017b65000e98eee69fae6f8e0b58038f110b0e3fece16a
3
+ size 16748
causality-detection/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26a27c0abf37888b7d44520c1c65869ecfe8b1568401f6b096e807a812d3fa80
3
+ size 118620
causality-identification/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bee2b04eb8f7ece8f7e249e607503a09fb43cb4d52b693afb4b49778c588851
3
+ size 20365
causality-identification/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17160bf3e93fa17aeda82d52c09cb44297f74993ae87a88a36b2a00e4f0d4ce4
3
+ size 145923
conversion_script.py CHANGED
@@ -8,17 +8,17 @@ Note: UniCausal refers to this dataset as 'esl2' in its processed splits.
8
 
9
  # 1) Install dependencies:
10
  # pip install git+https://github.com/TheMrSheldon/causality-toolkit.git
11
- # 2) Download these files:
12
- # - https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_test.csv
13
  # - https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_train.csv
 
14
 
15
  from pathlib import Path
16
 
17
  from ctk.data.constants import Task
18
  from ctk.data.conversion import UniCausal2HF
19
 
20
- converter = UniCausal2HF({"train": Path.cwd() / "esl2_train.csv",
21
- "test": Path.cwd() / "esl2_test.csv"}, Path.cwd())
22
 
23
  converter.convert(Task.CausalityDetection, "train")
24
  converter.convert(Task.CausalityDetection, "test")
 
8
 
9
  # 1) Install dependencies:
10
  # pip install git+https://github.com/TheMrSheldon/causality-toolkit.git
11
+ # 2) Source files (fetched automatically via pandas):
 
12
  # - https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_train.csv
13
+ # - https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_test.csv
14
 
15
  from pathlib import Path
16
 
17
  from ctk.data.constants import Task
18
  from ctk.data.conversion import UniCausal2HF
19
 
20
+ converter = UniCausal2HF({"train": "https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_train.csv",
21
+ "test": "https://raw.githubusercontent.com/tanfiona/UniCausal/refs/heads/main/data/splits/esl2_test.csv"}, Path.cwd(), grouped=False)
22
 
23
  converter.convert(Task.CausalityDetection, "train")
24
  converter.convert(Task.CausalityDetection, "test")