Datasets:
rcds
/

ArXiv:
Tags:
legal
License:
ramonachristen commited on
Commit
5e289ea
1 Parent(s): 08bc110

Update MultiLegalNeg.py

Browse files
Files changed (1) hide show
  1. MultiLegalNeg.py +6 -4
MultiLegalNeg.py CHANGED
@@ -3,6 +3,7 @@ import json
3
  import datasets
4
  import pandas as pd
5
  from huggingface_hub.file_download import hf_hub_url
 
6
 
7
  try:
8
  import lzma as xz
@@ -32,6 +33,9 @@ _SUBSETS = [
32
  "_sherlock", "_sfu", "_bioscope"
33
  ]
34
 
 
 
 
35
 
36
  class MultiLegalNegConfig(datasets.BuilderConfig):
37
 
@@ -39,16 +43,14 @@ class MultiLegalNegConfig(datasets.BuilderConfig):
39
  super( MultiLegalNegConfig, self).__init__(**kwargs)
40
  self.name = name
41
  self.language = name.split("_")[0]
42
- self.subset = name.split("_")[1] if len(name.split("_"))==3 else ""
43
 
44
  class MultiLegalNeg(datasets.GeneratorBasedBuilder):
45
 
46
  BUILDER_CONFIG_CLASS = MultiLegalNegConfig
47
 
48
  BUILDER_CONFIGS = [
49
- MultiLegalNegConfig(f"{language}{subset}") if language == 'en' else MultiLegalNegConfig(f"{language}")
50
- for language in _LANGUAGES + ['all']
51
- for subset in _SUBSETS + ['_all']
52
  ]
53
 
54
  def _info(self):
 
3
  import datasets
4
  import pandas as pd
5
  from huggingface_hub.file_download import hf_hub_url
6
+ from collections import OrderedDict
7
 
8
  try:
9
  import lzma as xz
 
33
  "_sherlock", "_sfu", "_bioscope"
34
  ]
35
 
36
+ _BUILDS = ['de', 'fr', 'it', 'swiss', 'en_bioscope', 'en_sherlock', 'en_sfu', 'en_all', 'all']
37
+
38
+
39
 
40
  class MultiLegalNegConfig(datasets.BuilderConfig):
41
 
 
43
  super( MultiLegalNegConfig, self).__init__(**kwargs)
44
  self.name = name
45
  self.language = name.split("_")[0]
46
+ self.subset = name.split("_")[1] if len(name.split("_"))==2 else ""
47
 
48
  class MultiLegalNeg(datasets.GeneratorBasedBuilder):
49
 
50
  BUILDER_CONFIG_CLASS = MultiLegalNegConfig
51
 
52
  BUILDER_CONFIGS = [
53
+ MultiLegalNegConfig(f"{build}") for build in _BUILDS
 
 
54
  ]
55
 
56
  def _info(self):