simplified the dataset to avoid errors
Browse files- prepare_data.py +4 -14
- test.jsonl.xz +2 -2
- train.jsonl.xz +2 -2
prepare_data.py
CHANGED
|
@@ -36,21 +36,11 @@ for split in ["train", "test"]:
|
|
| 36 |
df['judgement'] = get_dataset_column_from_text_folder(f"{path}/judgement")
|
| 37 |
df['dataset_name'] = dataset_name
|
| 38 |
|
| 39 |
-
|
| 40 |
-
if dataset_name == "UK-Abs":
|
| 41 |
-
if split == "test":
|
| 42 |
-
summary_full_path = f"{path}/summary/full"
|
| 43 |
-
for segment in ['background', 'judgement', 'reasons']:
|
| 44 |
-
df[f'summary/{segment}'] = get_dataset_column_from_text_folder(
|
| 45 |
-
f"{path}/summary/segment-wise/{segment}")
|
| 46 |
-
elif dataset_name == "IN-Ext":
|
| 47 |
summary_full_path = f"{path}/summary/full"
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
df[f'summary/{annotator}/{segment}'] = get_dataset_column_from_text_folder(
|
| 52 |
-
f"{path}/summary/segment-wise/{annotator}/{segment}")
|
| 53 |
-
df['summary/full'] = get_dataset_column_from_text_folder(summary_full_path)
|
| 54 |
dfs.append(df)
|
| 55 |
df = pd.concat(dfs)
|
| 56 |
df = df.fillna("") # NaNs can lead to huggingface not recognizing the feature type of the column
|
|
|
|
| 36 |
df['judgement'] = get_dataset_column_from_text_folder(f"{path}/judgement")
|
| 37 |
df['dataset_name'] = dataset_name
|
| 38 |
|
| 39 |
+
if dataset_name == "UK-Abs" and split == "test" or dataset_name == "IN-Ext":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
summary_full_path = f"{path}/summary/full"
|
| 41 |
+
else:
|
| 42 |
+
summary_full_path = f"{path}/summary"
|
| 43 |
+
df['summary'] = get_dataset_column_from_text_folder(summary_full_path)
|
|
|
|
|
|
|
|
|
|
| 44 |
dfs.append(df)
|
| 45 |
df = pd.concat(dfs)
|
| 46 |
df = df.fillna("") # NaNs can lead to huggingface not recognizing the feature type of the column
|
test.jsonl.xz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2ba3f5de08de7c70bd1157822b2224ef38b0ba54316267febf0e807f54d89e8
|
| 3 |
+
size 2300856
|
train.jsonl.xz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:779c6d28d3cc8b93132514988eb56ee5f464ce803553b4f8c9397c43ed3f5590
|
| 3 |
+
size 50587108
|