Opinions¶
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
Add attributes to store Holdings and Factors keyed to their text selectors.
The
holding_anchors
are text selectors for the wholeHolding
, not for any individualFactor
. Often select text used to indicate whether theRule
ismandatory
,universal
,valid
, ordecided
, or show theexclusive
way to reach the outputs.
Remove all
Holding
s from the opinion.
Yield contexts that would result in a contradiction between self and other.
- Return type
Check if other can be compared to self for implication or contradiction.
- Return type
Test whether
self
implies the absence ofother
.- Return type
- Returns
True
if self and other can’t both be true at the same time. Otherwise returnsFalse
.
Test whether
self
impliesother
.When inherited by
FactorGroup
, this method will check whether everyStatement
inother
is implied by some Statement inself
.>>> 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
Get one explanation of why self implies other.
- Return type
Get one explanation of why self and other contradict.
Using the
explanations_contradiction()
method, generates oneExplanation
of how an analogy between the generic terms of the two objects can make them contradictory.In this example using two
FactorGroup
s, if the threeStatement
s inbrexit
were asserted about the threeEntity
terms innafta
, 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
Yield contexts that would result in self implying other.
- Return type
Get all generic
Factor
s mentioned inself
.- Return type
- Returns
a list of generic
Factor
objects mentioned in anyinput
,output
, ordespite
Factor
ofself
, with guaranteed order, including each genericFactor
only once.
Search recursively in holdings of
self
forFactor
withname
.
Record that this Opinion endorses specified
Holding
s.- Return type
Add
Holding
s to thisOpinion
from a sequence.- Parameters
holdings (
Union
[AnchoredHoldings
,Iterable
[Union
[Holding
,Rule
]]]) – a sequence ofHolding
s that thisOpinion
posits as valid in its own court or jurisdiction, regardless of whetherself
accepts that theinputs
correspond to the reality of the current case, and regardless of whether the court orders that theoutputs
be put into effect.text_links – mapping of
Factor
s to theOpinion
passages where they can be found. Can be obtained as the mentioned return value of one of the functions inauthorityspoke.io.readers
.context (
Optional
[Sequence
[Factor
]]) – an ordered sequence (probablydict
) of genericFactor
objects fromself
which will provide the context for the new holding in the present case.
Add one or more
Holding
s to thisOpinion
.This method passes its values to
posit_holding()
orposit_holdings()
depending on whether the holding parameter is oneHolding
or alist
.- Parameters
holdings (
Union
[AnchoredHoldings
,Holding
,Iterable
[Union
[Holding
,Rule
]]]) – aHolding
that theOpinion
self
posits as valid in its own court or jurisdiction, regardless of whetherself
accepts that theinputs
of theHolding
correspond to the reality of the current case, and regardless of whether the court orders that theoutputs
of theHolding
be put into effect.text_links – list of lists of
Opinion
passages where references to eachHolding
can be found.context (
Optional
[Sequence
[Factor
]]) – an ordered sequence (probablydict
) of genericFactor
objects fromself
which will provide the context for the new holding in the present case.
- Return type
Determine if other implies all the Holdings of self.
- Return type
Find whether
self
’s holdings imply all the holdings ofother
.
Find whether
self
’s holdings implyother
’s but self != other.This actually tests for inequality because
Opinion
does not have ameans
method.- Return type
- Returns
self >= other and self != other.
Get text using a
TextQuoteSelector
.- Parameters
selector (
TextQuoteSelector
) – a selector referencing a text passage in thisOpinion
.- Return type
- Returns
the text referenced by the selector, or
None
if the text can’t be found.
Return str(self).
Holdings with objects storing the Holdings’ links to Opinion text.
Alias for field number 0
Alias for field number 1
Alias for field number 2
Alias for field number 3
Return self as a plain tuple. Used by copy and pickle.
Return a nicely formatted representation string