Datasets:

Modalities:
Tabular
Text
ArXiv:
Libraries:
Datasets
License:
Jonathan Li commited on
Commit
5ff5201
1 Parent(s): 7eb3a8d

Add dataset info

Browse files
Files changed (1) hide show
  1. echr.py +50 -0
echr.py CHANGED
@@ -1,4 +1,5 @@
1
  import datasets
 
2
 
3
  _CITATION = """\
4
  @inproceedings{chalkidis-etal-2019-neural,
@@ -18,6 +19,10 @@ _CITATION = """\
18
  """
19
 
20
  _HOMEPAGE = "https://archive.org/details/ECHR-ACL2019"
 
 
 
 
21
 
22
  ARTICLES = {
23
  "2": "Right to life",
@@ -63,8 +68,53 @@ ARTICLES = {
63
  "P13-3": "Prohibition of reservations",
64
  }
65
 
 
66
  class Echr(datasets.GeneratorBasedBuilder):
 
 
67
  BUILDER_CONFIGS = [
68
  datasets.BuilderConfig(name="non-anon", data_dir="data"),
69
  datasets.BuilderConfig(name="anon", data_dir="data_anon"),
70
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import datasets
2
+ from datasets import Value, Sequence
3
 
4
  _CITATION = """\
5
  @inproceedings{chalkidis-etal-2019-neural,
 
19
  """
20
 
21
  _HOMEPAGE = "https://archive.org/details/ECHR-ACL2019"
22
+ _DESCRIPTION = """\
23
+ The ECHR Cases dataset is designed for experimentation of neural judgment prediction, as in the original 2019 ACL paper "Neural Legal Judgment Prediction in English".
24
+ """
25
+
26
 
27
  ARTICLES = {
28
  "2": "Right to life",
 
68
  "P13-3": "Prohibition of reservations",
69
  }
70
 
71
+
72
  class Echr(datasets.GeneratorBasedBuilder):
73
+ """ECHR dataset."""
74
+
75
  BUILDER_CONFIGS = [
76
  datasets.BuilderConfig(name="non-anon", data_dir="data"),
77
  datasets.BuilderConfig(name="anon", data_dir="data_anon"),
78
  ]
79
+
80
+ def _info():
81
+ features = {
82
+ "itemid": Value(dtype="string", id=None),
83
+ "languageisocode": Value(dtype="string", id=None),
84
+ "respondent": Value(dtype="string", id=None),
85
+ "branch": Value(dtype="string", id=None),
86
+ "date": Value(dtype="int64", id=None),
87
+ "docname": Value(dtype="string", id=None),
88
+ "importance": Value(dtype="int64", id=None),
89
+ "conclusion": Value(dtype="string", id=None),
90
+ "judges": Value(dtype="string", id=None),
91
+ "text": Sequence(
92
+ feature=Value(dtype="string", id=None), length=-1, id=None
93
+ ),
94
+ "violated_articles": Sequence(
95
+ feature=Value(dtype="string", id=None), length=-1, id=None
96
+ ),
97
+ "violated_paragraphs": Sequence(
98
+ feature=Value(dtype="string", id=None), length=-1, id=None
99
+ ),
100
+ "violated_bulletpoints": Sequence(
101
+ feature=Value(dtype="string", id=None), length=-1, id=None
102
+ ),
103
+ "non_violated_articles": Sequence(
104
+ feature=Value(dtype="string", id=None), length=-1, id=None
105
+ ),
106
+ "non_violated_paragraphs": Sequence(
107
+ feature=Value(dtype="string", id=None), length=-1, id=None
108
+ ),
109
+ "non_violated_bulletpoints": Sequence(
110
+ feature=Value(dtype="string", id=None), length=-1, id=None
111
+ ),
112
+ "violated": Value(dtype="bool", id=None),
113
+ }
114
+
115
+ return datasets.DatasetInfo(
116
+ features=features,
117
+ homepage=_HOMEPAGE,
118
+ description=_DESCRIPTION,
119
+ citation=_CITATION,
120
+ )