Skip to content

Commit

Permalink
feat(opinion_types): Add support for opinion types
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flooie committed Jan 24, 2024
1 parent 3fd9bad commit c2d11f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions juriscraper/OpinionSite.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(self, *args, **kwargs):
"summaries",
"case_name_shorts",
"child_courts",
"opinion_types",
]
self._req_attrs = [
"case_dates",
Expand Down Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions juriscraper/lib/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit c2d11f6

Please sign in to comment.