Opinions

class authorityspoke.opinions.Opinion(**data)

A document that resolves legal issues in a case and posits legal holdings.

Usually an opinion must have type="majority" to create holdings binding on any courts.

Parameters
  • type – the opinion’s attitude toward the court’s disposition of the case. e.g. majority, dissenting, concurring, concurring in the result

  • author – name of the judge who authored the opinion, if identified

  • text

__repr__()

Return repr(self).

Return type

str

__str__()

Return str(self).

classmethod remove_author_name_punctuation(v)

Normalize Opinion author names by removing punctuation.

Return type

str

locate_text(selection)

Get set of position selectors for text in Opinion.

Return type

TextPositionSet

select_text(selector)

Get text using a TextQuoteSelector.

Parameters

selector (TextQuoteSelector) – a selector referencing a text passage in the Opinion.

Return type

Optional[str]

Returns

the text referenced by the selector, or None if the text can’t be found.

class authorityspoke.opinions.AnchoredHoldings(**data)

Holdings with objects storing the Holdings’ links to Opinion text.

find_term_index(term)

Find the index of a term in the holdings.

Return type

Optional[int]

add_term(term, anchors)

Add a term that can be found in self’s holdings, with the term’s anchors to the text.

Return type

None

get_term_anchors(key)

Get the anchors for a term.

Return type

TextPositionSet

find_enactment_index(enactment)

Find the index of a term in the holdings.

Return type

Optional[int]

add_enactment(enactment, anchors)

Add EnactmentPassage with text anchors, if it isn’t a duplicate.

Return type

None

get_enactment_anchors(key)

Get the anchors for a term.

Return type

TextPositionSet