From c2d11f671557bb6f5b3f6f889afc309e572e0097 Mon Sep 17 00:00:00 2001 From: William Palin Date: Wed, 24 Jan 2024 14:26:27 -0500 Subject: [PATCH] feat(opinion_types): Add support for opinion types Modeling the types we have in Courtlistener, we should be able to add opinion types if not default Combined Opinions This should allow us to caputre multiple opinion types and let courtlistener group them together when it occurs in the handful of courts we know about. --- juriscraper/OpinionSite.py | 4 ++++ juriscraper/lib/models.py | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/juriscraper/OpinionSite.py b/juriscraper/OpinionSite.py index 506a38cb5..e42d54b00 100644 --- a/juriscraper/OpinionSite.py +++ b/juriscraper/OpinionSite.py @@ -31,6 +31,7 @@ def __init__(self, *args, **kwargs): "summaries", "case_name_shorts", "child_courts", + "opinion_types", ] self._req_attrs = [ "case_dates", @@ -112,6 +113,9 @@ def _get_summaries(self): def _get_child_courts(self): return None + def _get_opinion_types(self): + return None + def extract_from_text(self, scraped_text): """Pass scraped text into function and return data as a dictionary diff --git a/juriscraper/lib/models.py b/juriscraper/lib/models.py index 7fe2a70ec..f2e657bc3 100644 --- a/juriscraper/lib/models.py +++ b/juriscraper/lib/models.py @@ -8,3 +8,18 @@ "WEST": 7, "NEUTRAL": 8, } + + +class OpinionType: + COMBINED = "010combined" + UNANIMOUS = "015unamimous" + LEAD = "020lead" + PLURALITY = "025plurality" + CONCURRENCE = "030concurrence" + CONCUR_IN_PART = "035concurrenceinpart" + DISSENT = "040dissent" + ADDENDUM = "050addendum" + REMITTUR = "060remittitur" + REHEARING = "070rehearing" + ON_THE_MERITS = "080onthemerits" + ON_MOTION_TO_STRIKE = "090onmotiontostrike"