Datasets:

srzhang commited on
Commit
93cc5d2
·
verified ·
1 Parent(s): caf4539

Update LongConL.py

Browse files
Files changed (1) hide show
  1. LongConL.py +4 -4
LongConL.py CHANGED
@@ -35,7 +35,7 @@ _CONFIGS = {
35
  "Opinion Text": datasets.Value("string"),
36
  "Numerical Label": datasets.Value("string"), # Will be optional for some tasks
37
  "Text Label": datasets.Value("string"), # Will be optional for some tasks
38
- "DC Numerical Label": datasets.Value("string")
39
  #"Syllabus": datasets.Value("string") # Will be optional for some tasks
40
  },
41
  }
@@ -55,7 +55,7 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
55
  "Opinion Text": datasets.Value("string"),
56
  "Numerical Label": datasets.Value("string"), # Will be optional for some tasks
57
  "Text Label": datasets.Value("string"), # Will be optional for some tasks
58
- "DC Numerical Label": datasets.Value("string")
59
  #"Syllabus": datasets.Value("string") # Will be optional for some tasks
60
  })
61
  return datasets.DatasetInfo(
@@ -104,9 +104,9 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
104
  "Citation": row["Citation"],
105
  "Full Case Name": row["Full Case Name"],
106
  "Opinion Text": row["Opinion Text"],
107
- "Numerical Label": row.get("Numerical Label", None), # Use .get() to handle missing keys
108
  "Text Label": row["Text Label"],
109
- "DC Numerical Label": row["DC Numerical Label"]
110
  #"Syllabus": row["Syllabus"]
111
  }
112
 
 
35
  "Opinion Text": datasets.Value("string"),
36
  "Numerical Label": datasets.Value("string"), # Will be optional for some tasks
37
  "Text Label": datasets.Value("string"), # Will be optional for some tasks
38
+ #"DC Numerical Label": datasets.Value("string")
39
  #"Syllabus": datasets.Value("string") # Will be optional for some tasks
40
  },
41
  }
 
55
  "Opinion Text": datasets.Value("string"),
56
  "Numerical Label": datasets.Value("string"), # Will be optional for some tasks
57
  "Text Label": datasets.Value("string"), # Will be optional for some tasks
58
+ #"DC Numerical Label": datasets.Value("string")
59
  #"Syllabus": datasets.Value("string") # Will be optional for some tasks
60
  })
61
  return datasets.DatasetInfo(
 
104
  "Citation": row["Citation"],
105
  "Full Case Name": row["Full Case Name"],
106
  "Opinion Text": row["Opinion Text"],
107
+ "Numerical Label": row.get("DC Numerical Label", None), # Use .get() to handle missing keys
108
  "Text Label": row["Text Label"],
109
+ #"DC Numerical Label": row["DC Numerical Label"]
110
  #"Syllabus": row["Syllabus"]
111
  }
112