Update OpinionBench.py
Browse files- OpinionBench.py +43 -19
OpinionBench.py
CHANGED
|
@@ -15,19 +15,43 @@ _URLS = {
|
|
| 15 |
}
|
| 16 |
|
| 17 |
TASK_NAMES = [
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
]
|
| 32 |
|
| 33 |
_CONFIGS = {
|
|
@@ -38,8 +62,8 @@ _CONFIGS = {
|
|
| 38 |
"Citation": datasets.Value("string"),
|
| 39 |
"Full Case Name": datasets.Value("string"),
|
| 40 |
"Opinion Text": datasets.Value("string"),
|
| 41 |
-
|
| 42 |
-
"Text Label": datasets.Value("string"), # Will be optional for some tasks
|
| 43 |
#"DC Numerical Label": datasets.Value("string")
|
| 44 |
#"Syllabus": datasets.Value("string") # Will be optional for some tasks
|
| 45 |
},
|
|
@@ -58,8 +82,8 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 58 |
"Citation": datasets.Value("string"),
|
| 59 |
"Full Case Name": datasets.Value("string"),
|
| 60 |
"Opinion Text": datasets.Value("string"),
|
| 61 |
-
|
| 62 |
-
"Text Label": datasets.Value("string"), # Will be optional for some tasks
|
| 63 |
#"DC Numerical Label": datasets.Value("string")
|
| 64 |
#"Syllabus": datasets.Value("string") # Will be optional for some tasks
|
| 65 |
})
|
|
@@ -112,8 +136,8 @@ class LongConLDataset(datasets.GeneratorBasedBuilder):
|
|
| 112 |
"Citation": row["Citation"],
|
| 113 |
"Full Case Name": row["Full Case Name"],
|
| 114 |
"Opinion Text": row["Opinion Text"],
|
| 115 |
-
|
| 116 |
-
"Text Label": row["Text Label"],
|
| 117 |
#"DC Numerical Label": row["DC Numerical Label"]
|
| 118 |
#"Syllabus": row["Syllabus"]
|
| 119 |
}
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
TASK_NAMES = [
|
| 18 |
+
'ATS Judgment Categories','Did the Court find ATS Jurisdiction?',
|
| 19 |
+
'Favorable Judgment for at least one Plaintiff affecting the ATS claim (this includes judgments that the ATS claim can or cannot move ahead)? (Yes, No, or NA if not impacting ATS claim but still an ATS case)',
|
| 20 |
+
'Is at least one defendant a corporation?',
|
| 21 |
+
'Chevron-Ag. Format', 'Chevron-Ag. Interp', 'Chevron-Ag. Iss 3', 'Chevron-Ag. Iss. 1',
|
| 22 |
+
'Chevron-Ag. Iss. 2', 'Chevron-Ag. Iss. 4', 'Chevron-Agency', 'Chevron-ChevCited', 'Chevron-Chevron',
|
| 23 |
+
'Chevron-Chief', 'Chevron-Concurr', 'Chevron-Dec. Ag. ', 'Chevron-Dec. Ov. ', 'Chevron-Deference', 'Chevron-Dissents',
|
| 24 |
+
'Chevron-Notice & Comment', 'Chevron-Outcome', 'Chevron-Step 0', 'Chevron-Step 1', 'Chevron-Step 2', 'Chevron-Subject',
|
| 25 |
+
'Chevron-Type Del. ', 'Chevron-Unan',
|
| 26 |
+
'CoA-abusedis', 'CoA-adminrev', 'CoA-alj', 'CoA-altdisp', 'CoA-amicus', 'CoA-appbus', 'CoA-appfed', 'CoA-appfiduc', 'CoA-applfrom',
|
| 27 |
+
'CoA-appnatpr', 'CoA-appnonp', 'CoA-appstate', 'CoA-appsubst', 'CoA-attyfee', 'CoA-bank_ap1', 'CoA-bank_r1', 'CoA-capric',
|
| 28 |
+
'CoA-casetyp1', 'CoA-circuit', 'CoA-classact', 'CoA-concur', 'CoA-confess', 'CoA-constit', 'CoA-counsel', 'CoA-counsel1',
|
| 29 |
+
'CoA-counsel2', 'CoA-crossapp', 'CoA-day', 'CoA-direct1', 'CoA-discover', 'CoA-dissent', 'CoA-district', 'CoA-dueproc',
|
| 30 |
+
'CoA-entrap', 'CoA-erron', 'CoA-execord', 'CoA-exhaust', 'CoA-fedlaw', 'CoA-fedvst', 'CoA-genapel1', 'CoA-geniss', 'CoA-genresp1',
|
| 31 |
+
'CoA-genstand', 'CoA-habeas', 'CoA-immunity', 'CoA-improper', 'CoA-indict', 'CoA-initiate', 'CoA-injunct', 'CoA-interven',
|
| 32 |
+
'CoA-judgdisc', 'CoA-juris', 'CoA-juryinst', 'CoA-majvotes', 'CoA-method', 'CoA-month', 'CoA-notice', 'CoA-numappel', 'CoA-numresp',
|
| 33 |
+
'CoA-opinstat', 'CoA-origin', 'CoA-othadmis', 'CoA-othjury', 'CoA-plea', 'CoA-post_trl', 'CoA-prejud', 'CoA-pretrial', 'CoA-procdis',
|
| 34 |
+
'CoA-procedur', 'CoA-r_bus', 'CoA-r_fed', 'CoA-r_fiduc', 'CoA-r_natpr', 'CoA-r_nonp', 'CoA-r_state', 'CoA-r_stid', 'CoA-r_subst',
|
| 35 |
+
'CoA-realapp', 'CoA-realresp', 'CoA-rtcouns', 'CoA-search', 'CoA-sentence', 'CoA-source', 'CoA-standing', 'CoA-state', 'CoA-statecl',
|
| 36 |
+
'CoA-stpolicy', 'CoA-subevid', 'CoA-suffic', 'CoA-summary', 'CoA-timely', 'CoA-treat', 'CoA-trialpro', 'CoA-typeiss', 'CoA-weightev',
|
| 37 |
+
'DC-casetype', 'DC-category', 'DC-circuit', 'DC-libcon', 'DC-month', 'DC-statdist', 'DC-state', 'DC-year',
|
| 38 |
+
'JRC-AREA1', 'JRC-ATT GEN', 'JRC-CERT', 'JRC-DECISION', 'JRC-DECISION2', 'JRC-DISSENT', 'JRC-GVT PRTY', 'JRC-REVERSD',
|
| 39 |
+
'SC-adminAction', 'SC-authorityDecision1', 'SC-caseDisposition', 'SC-caseOrigin', 'SC-caseOriginState', 'SC-caseSource',
|
| 40 |
+
'SC-caseSourceState', 'SC-certReason', 'SC-decisionDirection', 'SC-decisionDirectionDissent', 'SC-decisionType',
|
| 41 |
+
'SC-declarationUncon', 'SC-issue', 'SC-issueArea', 'SC-jurisdiction', 'SC-lawType', 'SC-lcDisagreement', 'SC-lcDisposition',
|
| 42 |
+
'SC-lcDispositionDirection', 'SC-majOpinWriter', 'SC-majVotes', 'SC-minVotes', 'SC-partyWinning', 'SC-petitioner',
|
| 43 |
+
'SC-precedentAlteration', 'SC-respondent', 'SC-respondentState', 'SC-threeJudgeFdc', 'SC-voteUnclear',
|
| 44 |
+
'SSC-agency', 'SSC-agency_r', 'SSC-amicus', 'SSC-arson', 'SSC-assaulta', 'SSC-burglary', 'SSC-ca_atty', 'SSC-ca_capo',
|
| 45 |
+
'SSC-ca_conv', 'SSC-ca_cruel', 'SSC-ca_disc', 'SSC-ca_disp', 'SSC-ca_doubj', 'SSC-ca_ev_m', 'SSC-ca_ev_w', 'SSC-ca_gjury',
|
| 46 |
+
'SSC-ca_insan', 'SSC-ca_jr_in', 'SSC-ca_jr_sl', 'SSC-ca_majfm', 'SSC-ca_opnfm', 'SSC-ca_plea', 'SSC-ca_prej', 'SSC-ca_race',
|
| 47 |
+
'SSC-ca_recus', 'SSC-ca_self', 'SSC-ca_sent', 'SSC-ca_sento', 'SSC-ca_serch', 'SSC-ca_sevr', 'SSC-ca_speed', 'SSC-ca_stc',
|
| 48 |
+
'SSC-ca_stcty', 'SSC-ca_stdc', 'SSC-ca_suff', 'SSC-ca_tot_c', 'SSC-ca_tot_i', 'SSC-ca_trial', 'SSC-ca_usc', 'SSC-ca_uscdc',
|
| 49 |
+
'SSC-ca_uscty', 'SSC-ca_venue', 'SSC-ca_winp', 'SSC-crossapp', 'SSC-death_c', 'SSC-death_im', 'SSC-dec1_day', 'SSC-dec1_mo',
|
| 50 |
+
'SSC-dec1_yr', 'SSC-decs_day', 'SSC-decs_mo', 'SSC-decs_yr', 'SSC-disorder', 'SSC-docket_n', 'SSC-drugabus',
|
| 51 |
+
'SSC-drugsell', 'SSC-dui', 'SSC-enbanc', 'SSC-fam_kids', 'SSC-first_ct', 'SSC-fraud', 'SSC-juris', 'SSC-kidnap', 'SSC-mans_neg',
|
| 52 |
+
'SSC-mans_non', 'SSC-multi_p', 'SSC-multi_r', 'SSC-murder', 'SSC-o_defend', 'SSC-o_plain', 'SSC-p1_persn', 'SSC-p1_sgov',
|
| 53 |
+
'SSC-parole', 'SSC-r1_persn', 'SSC-rape', 'SSC-rev_ct', 'SSC-robbery', 'SSC-sex_gen', 'SSC-stolen', 'SSC-theft', 'SSC-traffic',
|
| 54 |
+
'SSC-type_p1', 'SSC-type_p2'
|
| 55 |
]
|
| 56 |
|
| 57 |
_CONFIGS = {
|
|
|
|
| 62 |
"Citation": datasets.Value("string"),
|
| 63 |
"Full Case Name": datasets.Value("string"),
|
| 64 |
"Opinion Text": datasets.Value("string"),
|
| 65 |
+
"Numerical Label": datasets.Value("string"), # Will be optional for some tasks
|
| 66 |
+
#"Text Label": datasets.Value("string"), # Will be optional for some tasks
|
| 67 |
#"DC Numerical Label": datasets.Value("string")
|
| 68 |
#"Syllabus": datasets.Value("string") # Will be optional for some tasks
|
| 69 |
},
|
|
|
|
| 82 |
"Citation": datasets.Value("string"),
|
| 83 |
"Full Case Name": datasets.Value("string"),
|
| 84 |
"Opinion Text": datasets.Value("string"),
|
| 85 |
+
"Numerical Label": datasets.Value("string"), # Will be optional for some tasks
|
| 86 |
+
#"Text Label": datasets.Value("string"), # Will be optional for some tasks
|
| 87 |
#"DC Numerical Label": datasets.Value("string")
|
| 88 |
#"Syllabus": datasets.Value("string") # Will be optional for some tasks
|
| 89 |
})
|
|
|
|
| 136 |
"Citation": row["Citation"],
|
| 137 |
"Full Case Name": row["Full Case Name"],
|
| 138 |
"Opinion Text": row["Opinion Text"],
|
| 139 |
+
"Numerical Label": row.get("Numerical Label", None), # Use .get() to handle missing keys
|
| 140 |
+
#"Text Label": row["Text Label"],
|
| 141 |
#"DC Numerical Label": row["DC Numerical Label"]
|
| 142 |
#"Syllabus": row["Syllabus"]
|
| 143 |
}
|