Datasets:
rcds
/

ArXiv:
License:
Joelito commited on
Commit
1b156e5
1 Parent(s): e45c1f5

renamed full to main

Browse files
Files changed (1) hide show
  1. swiss_court_view_generation.py +5 -5
swiss_court_view_generation.py CHANGED
@@ -52,7 +52,7 @@ _LICENSE = ""
52
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
53
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
54
  _URLS = {
55
- "full": "https://huggingface.co/datasets/rcds/swiss_court_view_generation/resolve/main/L1/huggingface",
56
  "origin": "https://huggingface.co/datasets/rcds/swiss_court_view_generation/resolve/main/L2/huggingface"
57
  }
58
 
@@ -74,14 +74,14 @@ class SwissCourtViewGeneration(datasets.GeneratorBasedBuilder):
74
  # data = datasets.load_dataset('my_dataset', 'first_domain')
75
  # data = datasets.load_dataset('my_dataset', 'second_domain')
76
  BUILDER_CONFIGS = [
77
- datasets.BuilderConfig(name="full", version=VERSION, description="This part of my dataset covers the whole dataset"),
78
  datasets.BuilderConfig(name="origin", version=VERSION, description="This part of my dataset covers a subset containing only cases with origin data")
79
  ]
80
 
81
- DEFAULT_CONFIG_NAME = "full" # It's not mandatory to have a default configuration. Just use one if it make sense.
82
 
83
  def _info(self):
84
- if self.config.name == "full" or self.config.name == "origin": # This is the name of the configuration selected in BUILDER_CONFIGS above
85
  features = datasets.Features(
86
  {
87
  "decision_id": datasets.Value("string"),
@@ -164,7 +164,7 @@ class SwissCourtViewGeneration(datasets.GeneratorBasedBuilder):
164
  line_counter += 1
165
  if line:
166
  data = json.loads(line)
167
- if self.config.name == "full" or self.config.name == "origin":
168
  yield id, {
169
  "decision_id": data["decision_id"],
170
  "facts": data["facts"],
 
52
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
53
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
54
  _URLS = {
55
+ "main": "https://huggingface.co/datasets/rcds/swiss_court_view_generation/resolve/main/L1/huggingface",
56
  "origin": "https://huggingface.co/datasets/rcds/swiss_court_view_generation/resolve/main/L2/huggingface"
57
  }
58
 
 
74
  # data = datasets.load_dataset('my_dataset', 'first_domain')
75
  # data = datasets.load_dataset('my_dataset', 'second_domain')
76
  BUILDER_CONFIGS = [
77
+ datasets.BuilderConfig(name="main", version=VERSION, description="This part of my dataset covers the whole dataset"),
78
  datasets.BuilderConfig(name="origin", version=VERSION, description="This part of my dataset covers a subset containing only cases with origin data")
79
  ]
80
 
81
+ DEFAULT_CONFIG_NAME = "main" # It's not mandatory to have a default configuration. Just use one if it make sense.
82
 
83
  def _info(self):
84
+ if self.config.name == "main" or self.config.name == "origin": # This is the name of the configuration selected in BUILDER_CONFIGS above
85
  features = datasets.Features(
86
  {
87
  "decision_id": datasets.Value("string"),
 
164
  line_counter += 1
165
  if line:
166
  data = json.loads(line)
167
+ if self.config.name == "main" or self.config.name == "origin":
168
  yield id, {
169
  "decision_id": data["decision_id"],
170
  "facts": data["facts"],