XciD HF staff Clémentine clefourrier HF staff commited on
Commit
d56d2da
0 Parent(s):

Squashing commit

Browse files

Co-authored-by: Clémentine <Clémentine@users.noreply.huggingface.co>
Co-authored-by: clefourrier <clefourrier@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ # Audio files - uncompressed
37
+ *.pcm filter=lfs diff=lfs merge=lfs -text
38
+ *.sam filter=lfs diff=lfs merge=lfs -text
39
+ *.raw filter=lfs diff=lfs merge=lfs -text
40
+ # Audio files - compressed
41
+ *.aac filter=lfs diff=lfs merge=lfs -text
42
+ *.flac filter=lfs diff=lfs merge=lfs -text
43
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
44
+ *.ogg filter=lfs diff=lfs merge=lfs -text
45
+ *.wav filter=lfs diff=lfs merge=lfs -text
46
+ # Image files - uncompressed
47
+ *.bmp filter=lfs diff=lfs merge=lfs -text
48
+ *.gif filter=lfs diff=lfs merge=lfs -text
49
+ *.png filter=lfs diff=lfs merge=lfs -text
50
+ *.tiff filter=lfs diff=lfs merge=lfs -text
51
+ # Image files - compressed
52
+ *.jpg filter=lfs diff=lfs merge=lfs -text
53
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
54
+ *.webp filter=lfs diff=lfs merge=lfs -text
55
+ BillSum/test.jsonl filter=lfs diff=lfs merge=lfs -text
56
+ BillSum/train.jsonl filter=lfs diff=lfs merge=lfs -text
57
+ EurLexSum/test.jsonl filter=lfs diff=lfs merge=lfs -text
58
+ EurLexSum/train.jsonl filter=lfs diff=lfs merge=lfs -text
59
+ EurLexSum/validation.jsonl filter=lfs diff=lfs merge=lfs -text
60
+ MultiLexSum/validation.jsonl filter=lfs diff=lfs merge=lfs -text
61
+ MultiLexSum/test.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ MultiLexSum/train.jsonl filter=lfs diff=lfs merge=lfs -text
BillSum/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b7cd0389df1f14fe157af244b83a373d18412cca5227782acb6965854a7f4ac
3
+ size 31377309
BillSum/train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11f1e6cbd0edb49886c8081dda33badc5358f712f0ec999fdfc8f8e4df2a7471
3
+ size 182367536
EurLexSum/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c58979d2fc5e7d18d27ea4634f63237a8aaa74a082d470b3060eb63f22e04e19
3
+ size 24161641
EurLexSum/train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec809732098909442c9e76469b7c2120075fb9653e0ac2cf69d0dacb7d80f8e3
3
+ size 94194141
EurLexSum/validation.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ed351294b6451b83dc81ec7abe0f6118119a7a08601227234bebe21289df4a0
3
+ size 23906930
MultiLexSum/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e1d21fe09a9a5901a78b1ab5a70cc89cb5813597f579dbd23fd84c61f7a5566
3
+ size 3097934
MultiLexSum/train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f9f823b0653c97f694524b736390f664f5713529fb0bfce76eb116c10e80afe
3
+ size 11595929
MultiLexSum/validation.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03912375f6d620aad39e96986c36ce270f1b6c52168ace0fa1dd8f501f233ee6
3
+ size 1660344
legal_summarization.py ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import os
3
+ import json
4
+
5
+
6
+ _CITATION = """
7
+
8
+ """
9
+
10
+ _DESCRIPTION = """
11
+
12
+ """
13
+
14
+ class Builder(datasets.GeneratorBasedBuilder):
15
+ VERSION = datasets.Version("1.0.0")
16
+
17
+ BUILDER_CONFIGS = [
18
+ datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description=_DESCRIPTION)
19
+ for name in ["BillSum", "MultiLexSum", "EurLexSum"]
20
+ ]
21
+
22
+ def _info(self):
23
+ features = datasets.Features(
24
+ {
25
+ "article": datasets.Value("string"),
26
+ "summary": datasets.Value("string"),
27
+ }
28
+ )
29
+ return datasets.DatasetInfo(
30
+ description=_DESCRIPTION,
31
+ features=features,
32
+ homepage="",
33
+ license="",
34
+ citation=_CITATION,
35
+ )
36
+
37
+ def _split_generators(self, dl_manager):
38
+ train_json = dl_manager.download(os.path.join(self.config.name, "train.jsonl"))
39
+ if self.config.name != "BillSum":
40
+ valid_json = dl_manager.download(os.path.join(self.config.name, "validation.jsonl"))
41
+ test_json = dl_manager.download(os.path.join(self.config.name, "test.jsonl"))
42
+
43
+ return [
44
+ datasets.SplitGenerator(
45
+ name=datasets.Split.TRAIN,
46
+ gen_kwargs={"path": train_json},
47
+ ),
48
+ datasets.SplitGenerator(
49
+ name=datasets.Split.TEST,
50
+ gen_kwargs={"path": test_json},
51
+ )
52
+ ] + ([datasets.SplitGenerator(
53
+ name=datasets.Split.VALIDATION,
54
+ gen_kwargs={"path": valid_json},
55
+ )] if self.config.name != "BillSum" else [])
56
+
57
+ # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
58
+ def _generate_examples(self, path):
59
+ with open(path, encoding="utf-8") as f:
60
+ for key, row in enumerate(f):
61
+ yield key, json.loads(row)