Opinions

class authorityspoke.opinions.Opinion(name, name_abbreviation, citations, first_page, last_page, decision_date, court, position, author, text)

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

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

Parameters
  • name (str) – full name of the opinion, e.g. “ORACLE AMERICA, INC., Plaintiff-Appellant, v. GOOGLE INC., Defendant-Cross-Appellant”

  • name_abbreviation (str) – shorter name of the opinion, e.g. “Oracle America, Inc. v. Google Inc.”

  • citations (Iterable[str]) – citations to the opinion, usually in the format [Volume Number] [Reporter Name Abbreviation] [Page Number]

  • first_page (Optional[int]) – the page where the opinion begins in its official reporter

  • last_page (Optional[int]) – the page where the opinion ends in its official reporter

  • decision_date (datetime.date) – date when the opinion was first published by the court (not the publication date of the reporter volume)

  • court (str) – name of the court that published the opinion

  • position (Optional[str]) – the opinion’s attitude toward the court’s disposition of the case. e.g. majority, dissenting, concurring, concurring in the result

  • author (Optional[str]) – name of the judge who authored the opinion, if identified

contradicts(other, context=None)

Test whether other is or contains a Holding contradicted by self.

Parameters

other (Union[Opinion, Holding]) – another Opinion or Holding

Return type

bool

Returns

a bool indicating whether any holding of self is inconsistent with the Rule other, or with any holding of other if other is an Opinion.

property generic_factors

Get all generic Factors mentioned in self.

Return type

List[Factor]

Returns

a list of generic Factor objects mentioned in any input, output, or despite Factor of self, with guaranteed order, including each generic Factor only once.

get_factor_by_name(name)

Search recursively in holdings of self for Factor with name.

Parameters

name (str) – string to match with the name attribute of the Factor being searched for.

Return type

Optional[Factor]

Returns

a Factor with the specified name, if one exists in a Rule in self.holdings. Otherwise None.

posit_holding(holding, text_links=None, context=None)

Record that this Opinion endorses specified Holdings.

Return type

None

posit_holdings(holdings, text_links=None, context=None)

Add Holdings to this Opinion from a sequence.

Parameters
posit(holdings, text_links=None, context=None)

Add one or more Holdings to this Opinion.

This method passes its values to posit_holding() or posit_holdings() depending on whether the holding parameter is one Holding or a list.

Parameters
  • holding – a Holding that the Opinion self posits as valid in its own court or jurisdiction, regardless of whether self accepts that the inputs of the Holding correspond to the reality of the current case, and regardless of whether the court orders that the outputs of the Holding be put into effect.

  • text_links (Optional[Dict[Union[Factor, Enactment], List[TextQuoteSelector]]]) – mapping of Factors to the Opinion passages where they can be found. Can be obtained as the “mentioned” return value of one of the functions in authorityspoke.io.readers.

  • context (Optional[Sequence[Factor]]) – an ordered sequence (probably dict) of generic Factor objects from self which will provide the context for the new holding in the present case.

Return type

None

get_anchors(holding, include_factors=True)

Get text passages where a Holding is linked to self.

Parameters

holding (Holding) – a holding to find anchors for, which must be in holdings.

Return type

List[str]

Returns

a list with the text of each passage that anchors the Holding

__ge__(other)

Find whether self’s holdings imply all the holdings of other.

Return type

bool

Returns

a bool indicating whether the Rule other (or every holding of other, if other is an Opinion) is implied by some Rule in self.holdings.

__gt__(other)

Find whether self’s holdings imply other’s but self != other.

This actually tests for inequality because Opinion does not have a means method.

Return type

bool

Returns

self >= other and self != other.

select_text(selector)

Get text using a TextQuoteSelector.

Parameters

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

Return type

Optional[str]

Returns

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

__str__()

Return str(self).

__weakref__

list of weak references to the object (if defined)