Joelito commited on
Commit
176a3f1
1 Parent(s): 17e746e

simplified the dataset to avoid errors

Browse files
Files changed (3) hide show
  1. prepare_data.py +4 -14
  2. test.jsonl.xz +2 -2
  3. 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
- summary_full_path = f"{path}/summary"
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
- for annotator in ['A1', 'A2']:
49
- for segment in ['facts', 'judgement']: # errors when reading 'analysis' / 'argument' / 'statute'
50
- print(f"Processing {dataset_name} {split} {annotator} {segment}")
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:e56dd68c9d505c9c7850f32f9cd883a8e6737585f481c5aff35eb98623449098
3
- size 2323792
 
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:058ff61ae9c1c8f25c9bcaf3a33b3f472c74fde69b4aab7039121304e51f8ba5
3
- size 50582572
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:779c6d28d3cc8b93132514988eb56ee5f464ce803553b4f8c9397c43ed3f5590
3
+ size 50587108