Decisions

class authorityspoke.decisions.Decision(date, name=None, name_abbreviation=None, citations=None, first_page=None, last_page=None, court=None, opinions=None, jurisdiction=None, cites_to=None, id=None)

A court decision to resolve a step in litigation.

Uses the model of a judicial decision from the Caselaw Access Project API. One of these records may contain multiple Opinions.

Typically one record will contain all the Opinions from one appeal, but not necessarily from the whole lawsuit. One lawsuit may contain multiple appeals or other petitions, and if more then one of those generates published Opinions, the CAP API will divide those Opinions into a separate record for each appeal.

The outcome of a decision may be determined by one majority Opinion or by the combined effect of multiple Opinions. The lead opinion is commonly, but not always, the only Opinion that creates binding legal authority. Usually every Rule posited by the lead Opinion is binding, but some may not be, often because parts of the Opinion fail to command a majority of the panel of judges.

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

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

  • citations (Optional[Sequence[CAPCitation]]) – 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 – date when the opinion was first published by the court (not the publication date of the reporter volume)

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

  • _id – unique ID from CAP API

__init__(date, name=None, name_abbreviation=None, citations=None, first_page=None, last_page=None, court=None, opinions=None, jurisdiction=None, cites_to=None, id=None)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

contradicts(other)

Test whether self implies the absence of other.

Returns

True if self and other can’t both be true at the same time. Otherwise returns False.

explain_contradiction(other)

Get one explanation of why self and other contradict.

Using the explanations_contradiction() method, generates one Explanation of how an analogy between the generic terms of the two objects can make them contradictory.

In this example using two FactorGroups, if the three Statements in brexit were asserted about the three Entity terms in nafta, there would be an inconsistency as to whether one pair of Entities signed a treaty with each other.

>>> from nettlesome import Statement, Entity, FactorGroup
>>> nafta = FactorGroup([
...     Statement("$country1 signed a treaty with $country2",
...               terms=[Entity("Mexico"), Entity("USA")]),
...     Statement("$country2 signed a treaty with $country3",
...               terms=[Entity("USA"), Entity("Canada")]),
...     Statement("$country3 signed a treaty with $country1",
...           terms=[Entity("USA"), Entity("Canada")])])
>>> brexit = FactorGroup([
...     Statement("$country1 signed a treaty with $country2",
...               terms=[Entity("UK"), Entity("European Union")]),
...     Statement("$country2 signed a treaty with $country3",
...               terms=[Entity("European Union"), Entity("Germany")]),
...     Statement("$country3 signed a treaty with $country1",
...          terms=[Entity("Germany"), Entity("UK")], truth=False)])
>>> print(nafta.explain_contradiction(brexit))
Because <Mexico> is like <Germany>, and <USA> is like <UK>,
  the statement that <Mexico> signed a treaty with <USA>
CONTRADICTS
  the statement it was false that <Germany> signed a treaty with <UK>
Return type

Optional[Explanation]

explanations_contradiction(other)

Test whether self implies() the absence of other.

This should only be called after confirming that other is not None.

Return type

Iterator[Explanation]

Returns

True if self and other can’t both be true at the same time. Otherwise returns False.

explain_implication(other)

Get one explanation of why self implies other.

Return type

Optional[Explanation]

explanations_implication(other)

Generate ContextRegisters that cause self to imply other.

If self is absent, then generate a ContextRegister from other’s point of view and then swap the keys and values.

Return type

Iterator[Explanation]

posit(holdings, holding_anchors=None, named_anchors=None, context=None)

Add one or more Holdings to the majority Opinion of this Decision.

Return type

None

__ge__(other)

Call implies() as an alias.

Return type

bool

Returns

bool indicating whether self implies other

__gt__(other)

Test whether self implies other and self != other.

Return type

bool

explanations_implied_by(other, context=None)

Generate explanations for how other may imply self.

Return type

Iterator[Explanation]

implied_by(other, context=None)

Find whether other implies self.

Parameters
Return type

bool

Returns

whether other implies self.

implies(other, context=None)

Test whether self implies other.

When inherited by FactorGroup, this method will check whether every Statement in other is implied by some Statement in self.

>>> from nettlesome import Entity, Comparison, Statement, FactorGroup
>>> over_100y = Comparison("the distance between $site1 and $site2 was", sign=">", expression="100 yards")
>>> under_1mi = Comparison("the distance between $site1 and $site2 was", sign="<", expression="1 mile")
>>> protest_facts = FactorGroup(
...     [Statement(over_100y, terms=[Entity("the political convention"), Entity("the police cordon")]),
...      Statement(under_1mi, terms=[Entity("the police cordon"), Entity("the political convention")])])
>>> over_50m = Comparison("the distance between $site1 and $site2 was", sign=">", expression="50 meters")
>>> under_2km = Comparison("the distance between $site1 and $site2 was", sign="<=", expression="2 km")
>>> speech_zone_facts = FactorGroup(
...     [Statement(over_50m, terms=[Entity("the free speech zone"), Entity("the courthouse")]),
...      Statement(under_2km, terms=[Entity("the free speech zone"), Entity("the courthouse")])])
>>> protest_facts.implies(speech_zone_facts)
True
Return type

bool