Predicates
¶
A statement about real events or about a legal conclusion.
Predicates may be “alleged” by a pleading, “supported” by evidence, or “found” to be factual by a jury verdict or a judge’s finding of fact.
- Parameters
content (str) – a clause containing an assertion, with blanks represented by curly brackets showing where references to specific entities from the case can be inserted to make the clause specific.
truth (Optional[bool]) – indicates whether the clause in
content
is asserted to be true or false.None
indicates an assertion as to “whether” the clause is true or false, without specifying which.reciprocal (bool) – if True, then the order of the first two entities is considered interchangeable. There’s no way to make any entities interchangeable other than the first two.
comparison (str) – A string representing an equality or inequality sign like
==
,>
, or<=
. Used to indicate that the clause ends with a comparison to some quantity. Should be defined if and only if aquantity
is defined. Even though “=” is the default, it’s the least useful, because courts almost always state rules that are intended to apply to quantities above or below some threshold.quantity (Optional[Union[int, float, ureg.Quantity]]) – a Python number object or
ureg.Quantity
from the pint library. Comparisons to quantities can be used to determine whetherPredicate
s imply or contradict each other. A singlePredicate
may contain no more than onecomparison
and onequantity
.
Clean up and test validity of attributes.
If the
content
sentence is phrased to have a plural context factor, normalizes it by changing “were” to “was”.
Count bracket pairs in
self.content
, minus 1 ifself.quantity==True
.
Make a sentence by filling in
self.content
with genericFactor
s.- Parameters
context (
Union
[Factor
,Sequence
[Factor
]]) – genericFactor
s to be mentioned in the context of this Predicate. They do not need to be typeEntity
.- Return type
- Returns
a sentence created by substituting string representations of generic factors from a particular case into the return value of the
__str__()
method.
Test if
other
has a quantity parameter consistent withself
.- Return type
Test whether
other
andself
have contradictory meanings.This first tries to find a contradiction based on the relationship between the quantities in the
Predicate
s. If there are no quantities, it returnsFalse
only if the content is exactly the same andself.truth
is different.- Return type
Test if
content
strings ofself
andother
have same meaning.This once was used to disregard differences between “was” and “were”, but that now happens in
Predicate.__post_init__()
.
Test whether
self
andother
have identical meanings.To return
True
,other
can be neither broader nor narrower.- Return type
Test whether
self
impliesother
.- Return type
- Returns
whether
self
impliesother
, which isTrue
if their statements about quantity imply it.
Test whether
self
impliesother
.- Return type
- Returns
whether
self
impliesother
, which isTrue
if their statements about quantity imply it.
Return self>=value.
- Return type
Test if quantity ranges in self and other are non-overlapping.
- Return type
Test if the range of quantities mentioned in self is a subset of other’s.
- Return type
Also called the linguistic valency, arity, or adicity.
- Returns
the number of entities that can fit in the pairs of brackets in the predicate.
self.quantity
doesn’t count as one of these entities, even though the place whereself.quantity
goes in represented by brackets in theself.content
string.
Convert text to a comparison with a quantity.
Copy
self
, with the opposite truth value.- Return type
Return str(self).
Replace “was” with “were” after a context slot in a sentence.
- Parameters
- Return type
- Returns
a form of the sentence with one instance of “was” replaced with “were”
list of weak references to the object (if defined)