change data pulling method as data script is no longer supported
Browse files- .gitattributes +1 -0
- README.md +118 -8
- casename_classification/test.jsonl +3 -0
- casename_classification/test2.jsonl +3 -0
- casename_classification/train.jsonl +3 -0
- casename_classification/valid.jsonl +3 -0
- casename_classification_plus/test.jsonl +3 -0
- casename_classification_plus/train.jsonl +3 -0
- casename_classification_plus/valid.jsonl +3 -0
- lbox_open.py +0 -321
- legal_judgement_prediction/civil/test.jsonl +3 -0
- legal_judgement_prediction/civil/test2.jsonl +3 -0
- legal_judgement_prediction/civil/train.jsonl +3 -0
- legal_judgement_prediction/civil/valid.jsonl +3 -0
- legal_judgement_prediction/criminal/test.jsonl +3 -0
- legal_judgement_prediction/criminal/test2.jsonl +3 -0
- legal_judgement_prediction/criminal/train.jsonl +3 -0
- legal_judgement_prediction/criminal/valid.jsonl +3 -0
- precedent_corpus/train.jsonl +3 -0
- statute_classification/test.jsonl +3 -0
- statute_classification/test2.jsonl +3 -0
- statute_classification/train.jsonl +3 -0
- statute_classification/valid.jsonl +3 -0
- statute_classification_plus/test.jsonl +3 -0
- statute_classification_plus/train.jsonl +3 -0
- statute_classification_plus/valid.jsonl +3 -0
- summarization/test.jsonl +3 -0
- summarization/train.jsonl +3 -0
- summarization/valid.jsonl +3 -0
- summarization_plus/test.jsonl +3 -0
- summarization_plus/train.jsonl +3 -0
- summarization_plus/valid.jsonl +3 -0
.gitattributes
CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
35 |
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
36 |
*.ogg filter=lfs diff=lfs merge=lfs -text
|
37 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
|
|
|
35 |
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
36 |
*.ogg filter=lfs diff=lfs merge=lfs -text
|
37 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
38 |
+
*.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,10 +1,126 @@
|
|
1 |
---
|
2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
4 |
# Dataset Card for `lbox_open`
|
5 |
-
|
6 |
## Dataset Description
|
7 |
-
|
8 |
- **Homepage:** `https://lbox.kr`
|
9 |
- **Repository:** `https://github.com/lbox-kr/lbox_open`
|
10 |
- **Point of Contact:** [Wonseok Hwang](mailto:[email protected])
|
@@ -20,26 +136,20 @@ Korean
|
|
20 |
### How to use
|
21 |
```python
|
22 |
from datasets import load_dataset
|
23 |
-
|
24 |
# casename classficiation task
|
25 |
data_cn = load_dataset("lbox/lbox_open", "casename_classification")
|
26 |
data_cn_plus = load_dataset("lbox/lbox_open", "casename_classification_plus")
|
27 |
-
|
28 |
# statutes classification task
|
29 |
data_st = load_dataset("lbox/lbox_open", "statute_classification")
|
30 |
data_st_plus = load_dataset("lbox/lbox_open", "statute_classification_plus")
|
31 |
-
|
32 |
# Legal judgement prediction tasks
|
33 |
data_ljp_criminal = load_dataset("lbox/lbox_open", "ljp_criminal")
|
34 |
data_ljp_civil = load_dataset("lbox/lbox_open", "ljp_civil")
|
35 |
-
|
36 |
# case summarization task
|
37 |
data_summ = load_dataset("lbox/lbox_open", "summarization")
|
38 |
data_summ_plus = load_dataset("lbox/lbox_open", "summarization_plus")
|
39 |
-
|
40 |
# precedent corpus
|
41 |
data_corpus = load_dataset("lbox/lbox_open", "precedent_corpus")
|
42 |
-
|
43 |
```
|
44 |
|
45 |
For more information about the dataset, please visit <https://github.com/lbox-kr/lbox_open>.
|
|
|
1 |
---
|
2 |
license: cc-by-nc-4.0
|
3 |
+
configs:
|
4 |
+
- config_name: casename_classification
|
5 |
+
data_files:
|
6 |
+
- split: train
|
7 |
+
path: casename_classification/train.jsonl
|
8 |
+
- config_name: casename_classification
|
9 |
+
data_files:
|
10 |
+
- split: valid
|
11 |
+
path: casename_classification/valid.jsonl
|
12 |
+
- config_name: casename_classification
|
13 |
+
data_files:
|
14 |
+
- split: test
|
15 |
+
path: casename_classification/test.jsonl
|
16 |
+
- config_name: casename_classification
|
17 |
+
data_files:
|
18 |
+
- split: test2
|
19 |
+
path: casename_classification/test2.jsonl
|
20 |
+
- config_name: casename_classification
|
21 |
+
data_files:
|
22 |
+
- split: train
|
23 |
+
path: casename_classification_plus/train.jsonl
|
24 |
+
- config_name: casename_classification_plus
|
25 |
+
data_files:
|
26 |
+
- split: valid
|
27 |
+
path: casename_classification_plus/valid.jsonl
|
28 |
+
- config_name: casename_classification_plus
|
29 |
+
data_files:
|
30 |
+
- split: test
|
31 |
+
path: casename_classification_plus/test.jsonl
|
32 |
+
- config_name: statute_classification
|
33 |
+
data_files:
|
34 |
+
- split: train
|
35 |
+
path: statute_classification/train.jsonl
|
36 |
+
- config_name: statute_classification
|
37 |
+
data_files:
|
38 |
+
- split: valid
|
39 |
+
path: statute_classification/valid.jsonl
|
40 |
+
- config_name: statute_classification
|
41 |
+
data_files:
|
42 |
+
- split: test
|
43 |
+
path: statute_classification/test.jsonl
|
44 |
+
- config_name: statute_classification
|
45 |
+
data_files:
|
46 |
+
- split: test2
|
47 |
+
path: statute_classification/test2.jsonl
|
48 |
+
- config_name: statute_classification_plus
|
49 |
+
data_files:
|
50 |
+
- split: train
|
51 |
+
path: statute_classification_plus/train.jsonl
|
52 |
+
- config_name: statute_classification_plus
|
53 |
+
data_files:
|
54 |
+
- split: valid
|
55 |
+
path: statute_classification_plus/valid.jsonl
|
56 |
+
- config_name: statute_classification_plus
|
57 |
+
data_files:
|
58 |
+
- split: test
|
59 |
+
path: statute_classification_plus/test.jsonl
|
60 |
+
- config_name: summarization
|
61 |
+
data_files:
|
62 |
+
- split: train
|
63 |
+
path: summarization/train.jsonl
|
64 |
+
- config_name: summarization
|
65 |
+
data_files:
|
66 |
+
- split: valid
|
67 |
+
path: summarization/valid.jsonl
|
68 |
+
- config_name: summarization
|
69 |
+
data_files:
|
70 |
+
- split: test
|
71 |
+
path: summarization/test.jsonl
|
72 |
+
- config_name: summarization_plus
|
73 |
+
data_files:
|
74 |
+
- split: train
|
75 |
+
path: summarization_plus/train.jsonl
|
76 |
+
- config_name: summarization_plus
|
77 |
+
data_files:
|
78 |
+
- split: valid
|
79 |
+
path: summarization_plus/valid.jsonl
|
80 |
+
- config_name: summarization_plus
|
81 |
+
data_files:
|
82 |
+
- split: test
|
83 |
+
path: summarization_plus/test.jsonl
|
84 |
+
- config_name: ljp_civil
|
85 |
+
data_files:
|
86 |
+
- split: train
|
87 |
+
path: legal_judgement_prediction/civil/train.jsonl
|
88 |
+
- config_name: ljp_civil
|
89 |
+
data_files:
|
90 |
+
- split: valid
|
91 |
+
path: legal_judgement_prediction/civil/valid.jsonl
|
92 |
+
- config_name: ljp_civil
|
93 |
+
data_files:
|
94 |
+
- split: test
|
95 |
+
path: legal_judgement_prediction/civil/test.jsonl
|
96 |
+
- config_name: ljp_civil
|
97 |
+
data_files:
|
98 |
+
- split: test2
|
99 |
+
path: legal_judgement_prediction/civil/test2.jsonl
|
100 |
+
- config_name: ljp_criminal
|
101 |
+
data_files:
|
102 |
+
- split: train
|
103 |
+
path: legal_judgement_prediction/criminal/train.jsonl
|
104 |
+
- config_name: ljp_criminal
|
105 |
+
data_files:
|
106 |
+
- split: valid
|
107 |
+
path: legal_judgement_prediction/criminal/valid.jsonl
|
108 |
+
- config_name: ljp_criminal
|
109 |
+
data_files:
|
110 |
+
- split: test
|
111 |
+
path: legal_judgement_prediction/criminal/test.jsonl
|
112 |
+
- config_name: ljp_criminal
|
113 |
+
data_files:
|
114 |
+
- split: test2
|
115 |
+
path: legal_judgement_prediction/criminal/test2.jsonl
|
116 |
+
- config_name: precedent_corpus
|
117 |
+
data_files:
|
118 |
+
- split: train
|
119 |
+
path: precedent_corpus/train.jsonl
|
120 |
+
|
121 |
---
|
122 |
# Dataset Card for `lbox_open`
|
|
|
123 |
## Dataset Description
|
|
|
124 |
- **Homepage:** `https://lbox.kr`
|
125 |
- **Repository:** `https://github.com/lbox-kr/lbox_open`
|
126 |
- **Point of Contact:** [Wonseok Hwang](mailto:[email protected])
|
|
|
136 |
### How to use
|
137 |
```python
|
138 |
from datasets import load_dataset
|
|
|
139 |
# casename classficiation task
|
140 |
data_cn = load_dataset("lbox/lbox_open", "casename_classification")
|
141 |
data_cn_plus = load_dataset("lbox/lbox_open", "casename_classification_plus")
|
|
|
142 |
# statutes classification task
|
143 |
data_st = load_dataset("lbox/lbox_open", "statute_classification")
|
144 |
data_st_plus = load_dataset("lbox/lbox_open", "statute_classification_plus")
|
|
|
145 |
# Legal judgement prediction tasks
|
146 |
data_ljp_criminal = load_dataset("lbox/lbox_open", "ljp_criminal")
|
147 |
data_ljp_civil = load_dataset("lbox/lbox_open", "ljp_civil")
|
|
|
148 |
# case summarization task
|
149 |
data_summ = load_dataset("lbox/lbox_open", "summarization")
|
150 |
data_summ_plus = load_dataset("lbox/lbox_open", "summarization_plus")
|
|
|
151 |
# precedent corpus
|
152 |
data_corpus = load_dataset("lbox/lbox_open", "precedent_corpus")
|
|
|
153 |
```
|
154 |
|
155 |
For more information about the dataset, please visit <https://github.com/lbox-kr/lbox_open>.
|
casename_classification/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e4095da9314786bd7ca782f02e729b8ad2129f809643794d594f07079fcd8d25
|
3 |
+
size 1827282
|
casename_classification/test2.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b267ec25a6e1df179264d31b60ef5e90b7542b320625ec9139610680220a26e
|
3 |
+
size 2153941
|
casename_classification/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2920e7864bcff55dc10505b7bb8736bcb08765ece9fe62c5fc8339f45936b835
|
3 |
+
size 14368414
|
casename_classification/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03dcea621b3018589813088595964b7baedf1449097078ea0ad329321bd91a3f
|
3 |
+
size 1794012
|
casename_classification_plus/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e32b6ccb48ba7b25eafd18b68c2cebb337c9fdb95693bf0d2e65cb727bbe04a1
|
3 |
+
size 8826810
|
casename_classification_plus/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6a68057efa1fc18bbd3b4151f7db10820ccb69d4e7074ad3142262b1e9d294e2
|
3 |
+
size 40519150
|
casename_classification_plus/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b60c3348214e9979caf795bba174f21ac8cc79854ccc38ee126a293317b5cd2a
|
3 |
+
size 7104812
|
lbox_open.py
DELETED
@@ -1,321 +0,0 @@
|
|
1 |
-
# LBox Open
|
2 |
-
# Copyright (c) 2022-present LBox Co. Ltd.
|
3 |
-
# CC BY-NC 4.0
|
4 |
-
# 2022.10.18, Wonseok: Add casename_classification_plus, statute_classification_plus, summarization_plus datasets
|
5 |
-
|
6 |
-
import json
|
7 |
-
|
8 |
-
import datasets
|
9 |
-
|
10 |
-
_CASENAME_CLASSIFICATION_FEATURES = {
|
11 |
-
"id": datasets.Value("int64"),
|
12 |
-
"casetype": datasets.Value("string"),
|
13 |
-
"casename": datasets.Value("string"),
|
14 |
-
"facts": datasets.Value("string"),
|
15 |
-
}
|
16 |
-
|
17 |
-
_STATUTE_CLASSIFICATION_FEATURES = {
|
18 |
-
"id": datasets.Value("int64"),
|
19 |
-
"casetype": datasets.Value("string"),
|
20 |
-
"casename": datasets.Value("string"),
|
21 |
-
"statutes": datasets.features.Sequence(datasets.Value("string")),
|
22 |
-
"facts": datasets.Value("string"),
|
23 |
-
}
|
24 |
-
|
25 |
-
_LJP_CRIMINAL = {
|
26 |
-
"id": datasets.Value("int64"),
|
27 |
-
"casetype": datasets.Value("string"),
|
28 |
-
"casename": datasets.Value("string"),
|
29 |
-
"facts": datasets.Value("string"),
|
30 |
-
"reason": datasets.Value("string"),
|
31 |
-
"label": {
|
32 |
-
"text": datasets.Value("string"),
|
33 |
-
"fine_lv": datasets.Value("int64"),
|
34 |
-
"imprisonment_with_labor_lv": datasets.Value("int64"),
|
35 |
-
"imprisonment_without_labor_lv": datasets.Value("int64"),
|
36 |
-
},
|
37 |
-
"ruling": {
|
38 |
-
"text": datasets.Value("string"),
|
39 |
-
"parse": {
|
40 |
-
"fine": {
|
41 |
-
"type": datasets.Value("string"),
|
42 |
-
"unit": datasets.Value("string"),
|
43 |
-
"value": datasets.Value("int64"),
|
44 |
-
},
|
45 |
-
"imprisonment": {
|
46 |
-
"type": datasets.Value("string"),
|
47 |
-
"unit": datasets.Value("string"),
|
48 |
-
"value": datasets.Value("int64"),
|
49 |
-
},
|
50 |
-
},
|
51 |
-
},
|
52 |
-
}
|
53 |
-
|
54 |
-
_LJP_CIVIL = {
|
55 |
-
"id": datasets.Value("int64"),
|
56 |
-
"casetype": datasets.Value("string"),
|
57 |
-
"casename": datasets.Value("string"),
|
58 |
-
"facts": datasets.Value("string"),
|
59 |
-
"claim_acceptance_lv": datasets.Value("int64"),
|
60 |
-
"gist_of_claim": {
|
61 |
-
"text": datasets.Value("string"),
|
62 |
-
"money": {
|
63 |
-
"provider": datasets.Value("string"),
|
64 |
-
"taker": datasets.Value("string"),
|
65 |
-
"unit": datasets.Value("string"),
|
66 |
-
"value": datasets.Value("int64"),
|
67 |
-
},
|
68 |
-
},
|
69 |
-
"ruling": {
|
70 |
-
"text": datasets.Value("string"),
|
71 |
-
"money": {
|
72 |
-
"provider": datasets.Value("string"),
|
73 |
-
"taker": datasets.Value("string"),
|
74 |
-
"unit": datasets.Value("string"),
|
75 |
-
"value": datasets.Value("int64"),
|
76 |
-
},
|
77 |
-
"litigation_cost": datasets.Value("float32"),
|
78 |
-
},
|
79 |
-
}
|
80 |
-
|
81 |
-
_SUMMARIZATION_FEATURES = {
|
82 |
-
"id": datasets.Value("int64"),
|
83 |
-
"summary": datasets.Value("string"),
|
84 |
-
"precedent": datasets.Value("string"),
|
85 |
-
}
|
86 |
-
|
87 |
-
_PRECEDENT_CORPUS_FEATURES = {
|
88 |
-
"id": datasets.Value("int64"),
|
89 |
-
"precedent": datasets.Value("string"),
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
class LBoxOpenConfig(datasets.BuilderConfig):
|
94 |
-
"""BuilderConfig for OpenLBox."""
|
95 |
-
|
96 |
-
def __init__(
|
97 |
-
self,
|
98 |
-
features,
|
99 |
-
data_url,
|
100 |
-
citation,
|
101 |
-
url,
|
102 |
-
label_classes=("False", "True"),
|
103 |
-
**kwargs,
|
104 |
-
):
|
105 |
-
# Version history:
|
106 |
-
# 0.1.0: Initial version.
|
107 |
-
super(LBoxOpenConfig, self).__init__(
|
108 |
-
version=datasets.Version("0.2.0"), **kwargs
|
109 |
-
)
|
110 |
-
self.features = features
|
111 |
-
self.label_classes = label_classes
|
112 |
-
self.data_url = data_url
|
113 |
-
self.citation = citation
|
114 |
-
self.url = url
|
115 |
-
|
116 |
-
|
117 |
-
class LBoxOpen(datasets.GeneratorBasedBuilder):
|
118 |
-
"""The Legal AI Benchmark dataset from Korean Legal Cases."""
|
119 |
-
|
120 |
-
BUILDER_CONFIGS = [
|
121 |
-
LBoxOpenConfig(
|
122 |
-
name="casename_classification",
|
123 |
-
description="",
|
124 |
-
features=_CASENAME_CLASSIFICATION_FEATURES,
|
125 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/casename_classification/v0.1.2/",
|
126 |
-
citation="",
|
127 |
-
url="lbox.kr",
|
128 |
-
),
|
129 |
-
LBoxOpenConfig(
|
130 |
-
name="casename_classification_plus",
|
131 |
-
description="",
|
132 |
-
features=_CASENAME_CLASSIFICATION_FEATURES,
|
133 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/casename_classification/v0.1.2_plus/",
|
134 |
-
citation="",
|
135 |
-
url="lbox.kr",
|
136 |
-
),
|
137 |
-
LBoxOpenConfig(
|
138 |
-
name="statute_classification",
|
139 |
-
description="",
|
140 |
-
features=_STATUTE_CLASSIFICATION_FEATURES,
|
141 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/statute_classification/v0.1.2/",
|
142 |
-
citation="",
|
143 |
-
url="lbox.kr",
|
144 |
-
),
|
145 |
-
LBoxOpenConfig(
|
146 |
-
name="statute_classification_plus",
|
147 |
-
description="",
|
148 |
-
features=_STATUTE_CLASSIFICATION_FEATURES,
|
149 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/statute_classification/v0.1.2_plus/",
|
150 |
-
citation="",
|
151 |
-
url="lbox.kr",
|
152 |
-
),
|
153 |
-
LBoxOpenConfig(
|
154 |
-
name="ljp_criminal",
|
155 |
-
description="",
|
156 |
-
features=_LJP_CRIMINAL,
|
157 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/judgement_prediction/v0.1.2/criminal/",
|
158 |
-
citation="",
|
159 |
-
url="lbox.kr",
|
160 |
-
),
|
161 |
-
LBoxOpenConfig(
|
162 |
-
name="ljp_civil",
|
163 |
-
description="",
|
164 |
-
features=_LJP_CIVIL,
|
165 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/judgement_prediction/v0.1.2/civil/",
|
166 |
-
citation="",
|
167 |
-
url="lbox.kr",
|
168 |
-
),
|
169 |
-
LBoxOpenConfig(
|
170 |
-
name="summarization",
|
171 |
-
description="",
|
172 |
-
features=_SUMMARIZATION_FEATURES,
|
173 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/summarization/v0.1.0/",
|
174 |
-
citation="",
|
175 |
-
url="lbox.kr",
|
176 |
-
),
|
177 |
-
LBoxOpenConfig(
|
178 |
-
name="summarization_plus",
|
179 |
-
description="",
|
180 |
-
features=_SUMMARIZATION_FEATURES,
|
181 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/summarization/v0.1.0_plus/",
|
182 |
-
citation="",
|
183 |
-
url="lbox.kr",
|
184 |
-
),
|
185 |
-
LBoxOpenConfig(
|
186 |
-
name="precedent_corpus",
|
187 |
-
description="",
|
188 |
-
features=_PRECEDENT_CORPUS_FEATURES,
|
189 |
-
data_url="https://cdn.lbox.kr/public/dataset/lbox-open/precedent_benchmark_dataset/case_corpus/v0.1.0/",
|
190 |
-
citation="",
|
191 |
-
url="lbox.kr",
|
192 |
-
),
|
193 |
-
]
|
194 |
-
|
195 |
-
def _info(self):
|
196 |
-
return datasets.DatasetInfo(
|
197 |
-
description="",
|
198 |
-
features=datasets.Features(self.config.features),
|
199 |
-
homepage=self.config.url,
|
200 |
-
citation="",
|
201 |
-
)
|
202 |
-
|
203 |
-
def _split_generators(self, dl_manager):
|
204 |
-
if self.config.name == "precedent_corpus":
|
205 |
-
dl_dir = {
|
206 |
-
"train": dl_manager.download_and_extract(
|
207 |
-
f"{self.config.data_url}case_corpus-150k.jsonl"
|
208 |
-
)
|
209 |
-
or "",
|
210 |
-
}
|
211 |
-
|
212 |
-
return [
|
213 |
-
datasets.SplitGenerator(
|
214 |
-
name=datasets.Split.TRAIN,
|
215 |
-
gen_kwargs={
|
216 |
-
"data_file": dl_dir["train"],
|
217 |
-
"split": datasets.Split.TRAIN,
|
218 |
-
},
|
219 |
-
)
|
220 |
-
]
|
221 |
-
|
222 |
-
elif self.config.name in [
|
223 |
-
"casename_classification",
|
224 |
-
"statute_classification",
|
225 |
-
"ljp_criminal",
|
226 |
-
"ljp_civil",
|
227 |
-
]:
|
228 |
-
dl_dir = {
|
229 |
-
"train": dl_manager.download_and_extract(
|
230 |
-
f"{self.config.data_url}train.jsonl"
|
231 |
-
)
|
232 |
-
or "",
|
233 |
-
"valid": dl_manager.download_and_extract(
|
234 |
-
f"{self.config.data_url}valid.jsonl"
|
235 |
-
)
|
236 |
-
or "",
|
237 |
-
"test": dl_manager.download_and_extract(
|
238 |
-
f"{self.config.data_url}test.jsonl"
|
239 |
-
)
|
240 |
-
or "",
|
241 |
-
"test2": dl_manager.download_and_extract(
|
242 |
-
f"{self.config.data_url}test2.jsonl"
|
243 |
-
)
|
244 |
-
or "",
|
245 |
-
}
|
246 |
-
|
247 |
-
return [
|
248 |
-
datasets.SplitGenerator(
|
249 |
-
name=datasets.Split.TRAIN,
|
250 |
-
gen_kwargs={
|
251 |
-
"data_file": dl_dir["train"],
|
252 |
-
"split": datasets.Split.TRAIN,
|
253 |
-
},
|
254 |
-
),
|
255 |
-
datasets.SplitGenerator(
|
256 |
-
name=datasets.Split.VALIDATION,
|
257 |
-
gen_kwargs={
|
258 |
-
"data_file": dl_dir["valid"],
|
259 |
-
"split": datasets.Split.VALIDATION,
|
260 |
-
},
|
261 |
-
),
|
262 |
-
datasets.SplitGenerator(
|
263 |
-
name=datasets.Split.TEST,
|
264 |
-
gen_kwargs={
|
265 |
-
"data_file": dl_dir["test"],
|
266 |
-
"split": datasets.Split.TEST,
|
267 |
-
},
|
268 |
-
),
|
269 |
-
datasets.SplitGenerator(
|
270 |
-
name="test2",
|
271 |
-
gen_kwargs={
|
272 |
-
"data_file": dl_dir["test2"],
|
273 |
-
"split": "test2",
|
274 |
-
},
|
275 |
-
),
|
276 |
-
]
|
277 |
-
else:
|
278 |
-
dl_dir = {
|
279 |
-
"train": dl_manager.download_and_extract(
|
280 |
-
f"{self.config.data_url}train.jsonl"
|
281 |
-
)
|
282 |
-
or "",
|
283 |
-
"valid": dl_manager.download_and_extract(
|
284 |
-
f"{self.config.data_url}valid.jsonl"
|
285 |
-
)
|
286 |
-
or "",
|
287 |
-
"test": dl_manager.download_and_extract(
|
288 |
-
f"{self.config.data_url}test.jsonl"
|
289 |
-
)
|
290 |
-
or "",
|
291 |
-
}
|
292 |
-
|
293 |
-
return [
|
294 |
-
datasets.SplitGenerator(
|
295 |
-
name=datasets.Split.TRAIN,
|
296 |
-
gen_kwargs={
|
297 |
-
"data_file": dl_dir["train"],
|
298 |
-
"split": datasets.Split.TRAIN,
|
299 |
-
},
|
300 |
-
),
|
301 |
-
datasets.SplitGenerator(
|
302 |
-
name=datasets.Split.VALIDATION,
|
303 |
-
gen_kwargs={
|
304 |
-
"data_file": dl_dir["valid"],
|
305 |
-
"split": datasets.Split.VALIDATION,
|
306 |
-
},
|
307 |
-
),
|
308 |
-
datasets.SplitGenerator(
|
309 |
-
name=datasets.Split.TEST,
|
310 |
-
gen_kwargs={
|
311 |
-
"data_file": dl_dir["test"],
|
312 |
-
"split": datasets.Split.TEST,
|
313 |
-
},
|
314 |
-
),
|
315 |
-
]
|
316 |
-
|
317 |
-
def _generate_examples(self, data_file, split):
|
318 |
-
with open(data_file, encoding="utf-8") as f:
|
319 |
-
for line in f:
|
320 |
-
row = json.loads(line)
|
321 |
-
yield row["id"], row
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
legal_judgement_prediction/civil/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b4900a87453c9a705f7e2d7e077b13fcd15da35595f2b754ccc313f4a80cd060
|
3 |
+
size 1301442
|
legal_judgement_prediction/civil/test2.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a317f8570d161a69a4a5b34f76bd4c3095f225f8ad37c039e00d6cdc9628b398
|
3 |
+
size 1128147
|
legal_judgement_prediction/civil/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6ac729499e9dd83f3c79c0d729676f93a8c1ffb83cbcd0f8619fb947f1d31d73
|
3 |
+
size 10245151
|
legal_judgement_prediction/civil/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f64864e55c8e5b2a90b7ebbfa975a86047dedc2b69cebe6e899f53b0252ab76
|
3 |
+
size 1252420
|
legal_judgement_prediction/criminal/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd079c4752edf274f94092d8b354adfdfeb20ee75ddbd274c8987a7c1074d58a
|
3 |
+
size 2243355
|
legal_judgement_prediction/criminal/test2.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1338317ea6c9c408192ed4303150541d52474982fe01f421d0a8aadd558c98cc
|
3 |
+
size 1950162
|
legal_judgement_prediction/criminal/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25a337e08a1aa0a2fb7cf560427c69642e7d1bd1ce574457284dcb9e20fa6a3c
|
3 |
+
size 18169891
|
legal_judgement_prediction/criminal/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fef02d5869ebb1a268af753b7f636a6503d5948740da1dfc3b9a63b36181168
|
3 |
+
size 2269024
|
precedent_corpus/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b978d9e557d09b713f00e6b31f7d53de6f5fe8289ec26f8d038ed049f22d55b8
|
3 |
+
size 1162350003
|
statute_classification/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4bfc4471b275fee5819df9e8ba4546e807c410a9e4e104663ccb7d74c8a66ac3
|
3 |
+
size 388595
|
statute_classification/test2.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:124c9ca867accfdb652c05deb8b207a68b43269dde702bf9ca2b9e67cb4f6971
|
3 |
+
size 669562
|
statute_classification/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bb31403477c5a408f45ea7c3307bc2ed7b15101247c83753c2992798fc601ce0
|
3 |
+
size 3023342
|
statute_classification/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3b3937b95cc415e710d78cd4e7898a15ff802e1cef43564d5a849056e8c44374
|
3 |
+
size 390919
|
statute_classification_plus/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:84f7f0fe98c7e8b77493373eaefb28fdf5b30523aaf96af7d9b9db351dc83f42
|
3 |
+
size 3499823
|
statute_classification_plus/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:269b4bc75e89747a40c5cadd4b3eaddd9e93f92f9f9fa5715413243102f14e03
|
3 |
+
size 20242946
|
statute_classification_plus/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:07955b13639974bc8ca6098a6cb2f6a017170d2b2e201300b3b800a47db0ec52
|
3 |
+
size 3653816
|
summarization/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d56a3c52cc0f355712fa38d5d898e59fd287f8d6ec3cb85612fd202dc46767f
|
3 |
+
size 5978861
|
summarization/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de240533cd0fe8f0147876dd6d59f1d8eeb393a619e5ab70b65571c3eb81d137
|
3 |
+
size 48193850
|
summarization/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:658f85ecbdbf6daabb5c8097d1a1f1793ffc4c2d7427c2d23232100ed1526afb
|
3 |
+
size 6023663
|
summarization_plus/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:184319223ba35a20d76b95711b3058921bfb26d869eb361ac568226375bce017
|
3 |
+
size 39936151
|
summarization_plus/train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6d4566edf213d158703995787d13203be4e7ee10c787242900bec7cecb825fe
|
3 |
+
size 322559073
|
summarization_plus/valid.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:06873356960ad575081bc57791170658a6bed6a6a8821f402e559557579b3a22
|
3 |
+
size 40975131
|