Datasets:
rcds
/

Modalities:
Tabular
Text
Formats:
json
ArXiv:
DOI:
Libraries:
Datasets
pandas
License:
parquet-converter commited on
Commit
83a72db
·
1 Parent(s): 6eb81d4

Update parquet files

Browse files
README.md DELETED
@@ -1,211 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - machine-generated
4
- language:
5
- - de
6
- - fr
7
- - it
8
- language_creators:
9
- - expert-generated
10
- license: []
11
- multilinguality:
12
- - multilingual
13
- pretty_name: 'doc2doc information retrieval'
14
- size_categories:
15
- - 100K<n<1M
16
- source_datasets:
17
- - original
18
- tags: []
19
- task_categories:
20
- - text-classification
21
- task_ids:
22
- - entity-linking-classification
23
- ---
24
-
25
- https://huggingface.co/spaces/huggingface/datasets-tagging
26
-
27
-
28
- # Dataset Card for [doc2doc]
29
-
30
- ## Table of Contents
31
- - [Table of Contents](#table-of-contents)
32
- - [Dataset Description](#dataset-description)
33
- - [Dataset Summary](#dataset-summary)
34
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
35
- - [Languages](#languages)
36
- - [Dataset Structure](#dataset-structure)
37
- - [Data Instances](#data-instances)
38
- - [Data Fields](#data-fields)
39
- - [Data Splits](#data-splits)
40
- - [Dataset Creation](#dataset-creation)
41
- - [Curation Rationale](#curation-rationale)
42
- - [Source Data](#source-data)
43
- - [Annotations](#annotations)
44
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
45
- - [Considerations for Using the Data](#considerations-for-using-the-data)
46
- - [Social Impact of Dataset](#social-impact-of-dataset)
47
- - [Discussion of Biases](#discussion-of-biases)
48
- - [Other Known Limitations](#other-known-limitations)
49
- - [Additional Information](#additional-information)
50
- - [Dataset Curators](#dataset-curators)
51
- - [Licensing Information](#licensing-information)
52
- - [Citation Information](#citation-information)
53
- - [Contributions](#contributions)
54
-
55
- ## Dataset Description
56
-
57
- - **Homepage:**
58
- - **Repository:**
59
- - **Paper:**
60
- - **Leaderboard:**
61
- - **Point of Contact:**
62
-
63
- ### Dataset Summary
64
-
65
- doc2doc is a multilingual, diachronic dataset of 130K Swiss Federal Supreme Court (FSCS) cases annotated with law citations and ruling citations, posing a challenging text classification task. As unique label we are using decision_id of cited rulings and uuid of cited law articles, which can be found in the SwissCourtRulingCorpus. We also provide additional metadata, i.e., the publication year, the legal area and the canton of origin per case, to promote robustness and fairness studies on the critical area of legal NLP.
66
-
67
- ### Supported Tasks and Leaderboards
68
-
69
- doc2doc can be used as information retrieval task.
70
-
71
- ### Languages
72
-
73
- Switzerland has four official languages with three languages (German 85K, French 30k and Italian 10k) being represented. The decisions are written by the judges and clerks in the language of the proceedings.
74
-
75
- ## Dataset Structure
76
-
77
- ### Data Instances
78
-
79
- ```
80
- {
81
- "decision_id": ,
82
- "language": de,
83
- "year": 2018,
84
- "chamber": ,
85
- "court": ,
86
- "canton": ,
87
- "region": ,
88
- "origin_chamber": ,
89
- "origin_court": ,
90
- "origin_canton": ,
91
- "law_area": ,
92
- "law_sub_area": ,
93
- "laws": ,
94
- "cited_rulings": ,
95
- "facts": ,
96
- "considerations": ,
97
- "rulings": ,
98
- "origin_facts": ,
99
- "origin_considerations": ,
100
- }
101
- ```
102
-
103
- ### Data Fields
104
-
105
- ```
106
- decision_id: (str) a unique identifier of the for the document
107
- language: (str) one of (de, fr, it)
108
- year: (int) the publication year
109
- chamber: (str) the chamber of the case
110
- court: (str) the court of the case
111
- canton: (str) the canton
112
- region: (str) the region of the case
113
- origin_chamber: (str) the chamber of the origin case
114
- origin_court: (str) the court of the origin case
115
- origin_canton: (str) the canton of the origin case
116
- law_area: (str) the law area of the case
117
- law_sub_area:(str) the law sub area of the case
118
- laws: (str) a list of laws as example: ['art. 34 CPP', 'art. 32 CPP']
119
- cited rulings: (str) a list of cited rulings as example: ["BGE 124 II 234", "BGE 145 III 23"]
120
- facts: (str) the facts of the case
121
- considerations: (str) the considerations of the case
122
- rulings: (str) the rulings of the case
123
- origin_facts: (str) the facts of the origin case
124
- origin_considerations: (str) the considerations of the origin case
125
- ```
126
-
127
- ### Data Splits
128
-
129
- The dataset was split date-stratisfied
130
- - Train: 2002-2015
131
- - Validation: 2016-2017
132
- - Test: 2018-2022
133
-
134
- | Language | Subset | Number of Documents (Training/Validation/Test) |
135
- |------------|------------|--------------------------------------------|
136
- | German | **de** | / / |
137
- | French | **fr** | / / |
138
- | Italian | **it** | / / |
139
-
140
-
141
- ## Dataset Creation
142
-
143
- ### Curation Rationale
144
-
145
- The dataset was curated by Stern et al. (2023).
146
-
147
- ### Source Data
148
-
149
- #### Initial Data Collection and Normalization
150
-
151
- The original data are available at the Swiss Federal Supreme Court (https://www.bger.ch) in unprocessed formats (HTML). The documents were downloaded from the Entscheidsuche portal (https://entscheidsuche.ch) in HTML.
152
-
153
- #### Who are the source language producers?
154
-
155
- The original data are published from the Swiss Federal Supreme Court (https://www.bger.ch) in unprocessed formats (HTML). The documents were downloaded from the Entscheidsuche portal (https://entscheidsuche.ch) in HTML.
156
-
157
- ### Annotations
158
-
159
- #### Annotation process
160
-
161
- The decisions have been annotated with the citation ids using html tags and parsers.
162
-
163
- #### Who are the annotators?
164
-
165
- Ronja Stern annotated the citations.
166
- Metadata is published by the Swiss Federal Supreme Court (https://www.bger.ch).
167
-
168
- ### Personal and Sensitive Information
169
-
170
- The dataset contains publicly available court decisions from the Swiss Federal Supreme Court. Personal or sensitive information has been anonymized by the court before publication according to the following guidelines: https://www.bger.ch/home/juridiction/anonymisierungsregeln.html.
171
-
172
- ## Considerations for Using the Data
173
-
174
- ### Social Impact of Dataset
175
-
176
- [More Information Needed]
177
-
178
- ### Discussion of Biases
179
-
180
- [More Information Needed]
181
-
182
- ### Other Known Limitations
183
-
184
- [More Information Needed]
185
-
186
- ## Additional Information
187
-
188
- ### Dataset Curators
189
-
190
- [More Information Needed]
191
-
192
- ### Licensing Information
193
-
194
- We release the data under CC-BY-4.0 which complies with the court licensing (https://www.bger.ch/files/live/sites/bger/files/pdf/de/urteilsveroeffentlichung_d.pdf)
195
- © Swiss Federal Supreme Court, 2002-2022
196
-
197
- The copyright for the editorial content of this website and the consolidated texts, which is owned by the Swiss Federal Supreme Court, is licensed under the Creative Commons Attribution 4.0 International licence. This means that you can re-use the content provided you acknowledge the source and indicate any changes you have made.
198
- Source: https://www.bger.ch/files/live/sites/bger/files/pdf/de/urteilsveroeffentlichung_d.pdf
199
-
200
- ### Citation Information
201
-
202
- *Visu, Ronja, Joel*
203
- *Title: Blabliblablu*
204
- *Name of conference*
205
- ```
206
- cit
207
- ```
208
-
209
- ### Contributions
210
-
211
- Thanks to [@Stern5497](https://github.com/stern5497) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
doc2doc.py DELETED
@@ -1,173 +0,0 @@
1
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Dataset for the doc2doc information retrieval task."""
15
-
16
- import json
17
- import lzma
18
- import os
19
-
20
- import datasets
21
- try:
22
- import lzma as xz
23
- except ImportError:
24
- import pylzma as xz
25
-
26
-
27
- # TODO: Add BibTeX citation
28
- # Find for instance the citation on arxiv or on the dataset repo/website
29
- _CITATION = """\
30
- @InProceedings{huggingface:dataset,
31
- title = {A great new dataset},
32
- author={huggingface, Inc.
33
- },
34
- year={2020}
35
- }
36
- """
37
-
38
- # You can copy an official description
39
- _DESCRIPTION = """\
40
- This dataset contains Swiss federal court decisions for the legal criticality prediction task
41
- """
42
-
43
- _URLS = {
44
- "full": "https://huggingface.co/datasets/rcds/doc2doc/resolve/main/data",
45
- }
46
-
47
-
48
- class doc2doc(datasets.GeneratorBasedBuilder):
49
- """This dataset contains court decision for doc2doc information retrieval task."""
50
-
51
-
52
- BUILDER_CONFIGS = [
53
- datasets.BuilderConfig(name="full", description="This part covers the whole dataset"),
54
- ]
55
-
56
- DEFAULT_CONFIG_NAME = "full" # It's not mandatory to have a default configuration. Just use one if it make sense.
57
-
58
- def _info(self):
59
- if self.config.name == "full" or self.config.name == "origin": # This is the name of the configuration selected in BUILDER_CONFIGS above
60
- features = datasets.Features(
61
- {
62
- "decision_id": datasets.Value("string"),
63
- "language": datasets.Value("string"),
64
- "year": datasets.Value("int32"),
65
- "chamber": datasets.Value("string"),
66
- "court": datasets.Value("string"),
67
- "canton": datasets.Value("string"),
68
- "region": datasets.Value("string"),
69
- "origin_chamber": datasets.Value("string"),
70
- "origin_court": datasets.Value("string"),
71
- "origin_canton": datasets.Value("string"),
72
- "law_area": datasets.Value("string"),
73
- "law_sub_area": datasets.Value("string"),
74
- "cited_rulings": datasets.Value("string"),
75
- "laws": datasets.Value("string"),
76
- "facts": datasets.Value("string"),
77
- "considerations": datasets.Value("string"),
78
- "rulings": datasets.Value("string"),
79
- "origin_facts": datasets.Value("string"),
80
- "origin_considerations": datasets.Value("string"),
81
- # These are the features of your dataset like images, labels ...
82
- }
83
- )
84
- return datasets.DatasetInfo(
85
- # This is the description that will appear on the datasets page.
86
- description=_DESCRIPTION,
87
- # This defines the different columns of the dataset and their types
88
- features=features, # Here we define them above because they are different between the two configurations
89
- # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
90
- # specify them. They'll be used if as_supervised=True in builder.as_dataset.
91
- # supervised_keys=("sentence", "label"),
92
- # Homepage of the dataset for documentation
93
- # homepage=_HOMEPAGE,
94
- # License for the dataset if available
95
- # license=_LICENSE,
96
- # Citation for the dataset
97
- # citation=_CITATION,
98
- )
99
-
100
- def _split_generators(self, dl_manager):
101
- # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
102
-
103
- # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
104
- # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
105
- # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
106
- urls = _URLS[self.config.name]
107
- filepath_train = dl_manager.download(os.path.join(urls, "train.jsonl.xz"))
108
- filepath_validation = dl_manager.download(os.path.join(urls, "validation.jsonl.xz"))
109
- filepath_test = dl_manager.download(os.path.join(urls, "test.jsonl.xz"))
110
-
111
- return [
112
- datasets.SplitGenerator(
113
- name=datasets.Split.TRAIN,
114
- # These kwargs will be passed to _generate_examples
115
- gen_kwargs={
116
- "filepath": filepath_train,
117
- "split": "train",
118
- },
119
- ),
120
- datasets.SplitGenerator(
121
- name=datasets.Split.VALIDATION,
122
- # These kwargs will be passed to _generate_examples
123
- gen_kwargs={
124
- "filepath": filepath_validation,
125
- "split": "validation",
126
- },
127
- ),
128
- datasets.SplitGenerator(
129
- name=datasets.Split.TEST,
130
- # These kwargs will be passed to _generate_examples
131
- gen_kwargs={
132
- "filepath": filepath_test,
133
- "split": "test"
134
- },
135
- )
136
- ]
137
-
138
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
139
- def _generate_examples(self, filepath, split):
140
- # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
141
- line_counter = 0
142
- try:
143
- with xz.open(open(filepath, "rb"), "rt", encoding="utf-8") as f:
144
- for id, line in enumerate(f):
145
- line_counter += 1
146
- if line:
147
- data = json.loads(line)
148
- if self.config.name == "full" or self.config.name == "origin":
149
- yield id, {
150
- "decision_id": data["decision_id"],
151
- "language": data["language"],
152
- "year": data["year"],
153
- "chamber": data["chamber"],
154
- "court": data["court"],
155
- "canton": data["canton"],
156
- "region": data["region"],
157
- "origin_chamber": data["origin_chamber"],
158
- "origin_court": data["origin_court"],
159
- "origin_canton": data["origin_canton"],
160
- "law_area": data["law_area"],
161
- "law_sub_area": data["law_sub_area"],
162
- "cited_rulings": data["cited_rulings"],
163
- "laws": data["laws"],
164
- "facts": data["facts"],
165
- "considerations": data["considerations"],
166
- "rulings": data["rulings"],
167
- "origin_facts": data["origin_facts"],
168
- "origin_considerations": data["origin_considerations"]
169
- }
170
- except lzma.LZMAError as e:
171
- print(split, e)
172
- if line_counter == 0:
173
- raise e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/train.jsonl.xz → full/doc2doc-test.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c73b940460ec6596e0e9640926d67d4857565babb3351efbc811f220765f15cb
3
- size 228902808
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c693910aa1952961513c4d6aaedb111183e3e9150db91a1a372087489294d9a
3
+ size 220714765
data/validation.jsonl.xz → full/doc2doc-train-00000-of-00003.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:629277edb40a13e3108aa68a814b92545187e3e6741afc3cfa289c8490d065aa
3
- size 32592940
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0bf7a6cf512ad1d66c7abbc73c82347c2f3bf822150a078069f23eae1e39d49
3
+ size 252136563
full/doc2doc-train-00001-of-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed16d96caff59ee9fd3a911d5ed7f792823db467f0598f5c20b711d2d09d2acd
3
+ size 251326259
full/doc2doc-train-00002-of-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15d7767fadaaac2b54a902a4781b341c4e0d875de06178ab43c69de2ddf39b82
3
+ size 108884668
data/test.jsonl.xz → full/doc2doc-validation.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6170a45aa5f4be91b3ed6fc3702500106d56bc83a599cce090a5779cb37cf0d2
3
- size 82048828
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e38da97ef88dd1a82c0adea3c2ad0aefe328a715da3cb0a6c718814865da1fd7
3
+ size 88521835