Factors

class authorityspoke.factors.Factor(*, name=None, generic=False, absent=False, anchors=Field(name=None, type=None, default=<dataclasses._MISSING_TYPE object>, default_factory=<class 'list'>, init=True, repr=True, hash=None, compare=True, metadata=mappingproxy({}), _field_type=None))

Things relevant to a Court’s application of a Rule.

The same Factor that is in the outputs for the Procedure of one legal Rule might be in the inputs of the Procedure for another.

__init__(*, name=None, generic=False, absent=False, anchors=Field(name=None, type=None, default=<dataclasses._MISSING_TYPE object>, default_factory=<class 'list'>, init=True, repr=True, hash=None, compare=True, metadata=mappingproxy({}), _field_type=None))

Designate attributes inherited from Factor as keyword-only.

property context_factor_names

Get names of attributes to compare in means() or __ge__().

This method and interchangeable_factors() should be the only parts of the context-matching process that need to be unique for each subclass of Factor.

Return type

Tuple[str, …]

Returns

attribute names identifying which attributes of self and other must match, for a Analogy to hold between this Factor and another.

property context_factors

Get Factors used in comparisons with other Factors.

Return type

FactorSequence

Returns

a tuple of attributes that are designated as the context_factors for whichever subclass of Factor calls this method. These can be used for comparing objects using consistent_with()

explanations_consistent_with_factor(other, context=None)

Test whether self does not contradict other.

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

Return type

Iterator[ContextRegister]

Returns

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

explanations_same_meaning(other, context=None)

Generate ways to match contexts of self and other so they mean the same.

Return type

Iterator[ContextRegister]

compare_context_factors(other, relation)

Test if relation holds for corresponding context factors of self and other.

This doesn’t track a persistent ContextRegister as it goes down the sequence of Factor pairs. Perhaps(?) this simpler process can weed out Factors that clearly don’t satisfy a comparison before moving on to the more costly Analogy process. Or maybe it’s useful for testing.

Return type

bool

make_generic()

Get a copy of self except ensure generic is True.

Note

The new object created with this method will have all the attributes of self except generic=False. Therefore the method isn’t equivalent to creating a new instance of the class with only the generic attribute specified. To do that, you would use Fact(generic=True).

Return type

Factor

Returns

a new object changing generic to True.

__str__()

Return str(self).

Entities

Inheritance diagram of authorityspoke.entities.Entity
class authorityspoke.entities.Entity(name=None, generic=True, plural=False, anchors=<factory>)

Things that exist in the outside world, like people, places, or events.

Not concepts that derive their meaning from litigation, such as a legal Fact, an Allegation, a Pleading, etc.

Best used to specify things to be mentioned in multiple Factors in a Rule, often in the Predicate of a Fact object.

An Entity is often, but not always, generic with respect to the meaning of the Rule in which it is mentioned, which means that the Rule is understood to apply generally even if some other Entity was substituted.

Parameters
  • name (Optional[str]) – An identifier. An Entity with the same name is considered to refer to the same specific object, but if they have different names but are generic and are otherwise the same, then they’re considered to have the same meaning and they evaluate equal to one another.

  • generic (bool) – Determines whether a change in the name of the Entity would change the meaning of the Factor in which the Entity is embedded.

  • plural (bool) – Specifies whether the Entity object refers to more than one thing. In other words, whether it would be represented by a plural noun.

means(other)

Test whether other has the same meaning as self.

Generic Entity objects are considered equivalent in meaning as long as they’re the same class. If not generic, they’re considered equivalent if all their attributes are the same.

__ge__(other)

Call implies() as an alias.

Returns

bool indicating whether self implies other

__str__()

Return str(self).

new_context(changes)

Create new Factor, replacing keys of changes with values.

Assumes no changes are possible because the new_context_helper() decorator would have replaced self if any replacement was available.

Return type

Entity

Facts

Inheritance diagram of authorityspoke.facts.Fact
class authorityspoke.facts.Fact(predicate, context_factors=(), name=None, standard_of_proof=None, absent=False, generic=False, anchors=<factory>)

An assertion accepted as factual by a court.

Often based on factfinding by a judge or jury.

Parameters
  • predicate (Predicate) – a natural-language clause with zero or more slots to insert context_factors that are typically the subject and objects of the clause.

  • context_factors (FactorSequence) – a series of Factor objects that fill in the blank spaces in the predicate statement.

  • name (Optional[str]) – an identifier for this object, often used if the object needs to be referred to multiple times in the process of composing other Factor objects.

  • standard_of_proof (Optional[str]) – a descriptor for the degree of certainty associated with the assertion in the predicate.

  • absent (bool) – whether the absence, rather than the presence, of the legal fact described above is being asserted.

  • generic (bool) – whether this object could be replaced by another generic object of the same class without changing the truth of the Rule in which it is mentioned.

Attr standards_of_proof

a tuple with every allowable name for a standard of proof, in order from weakest to strongest.

Exhibits

Inheritance diagram of authorityspoke.evidence.Exhibit
class authorityspoke.evidence.Exhibit(form=None, statement=None, statement_attribution=None, name=None, absent=False, generic=False, anchors=<factory>)

A source of information for use in litigation.

Parameters
  • form (Optional[str]) – a term describing the category of exhibit. For example: testimony, declaration, document, or recording.

  • statement (Optional[Fact]) – a fact assertion made via the exhibit. For instance, if the exhibit is a document, this parameter could refer to a statement printed on the document.

  • statement_attribution (Optional[Entity]) – the Entity that the exhibit imputes the statement to. For instance, for a signed declaration, this would refer to the person whose signature appears on the declaration, regardless of any authentication concerns. The statement_attribution parameter may appear without the statement parameter, especially if the content of the statement is irrelevant.

  • name (Optional[str]) – a string identifier for the exhibit

  • absent (bool) – if True, indicates that no exhibit meeting the description exists in the litigation. If the exhibit has merely been rejected as evidence, use the absent attribute on an Evidence object instead.

  • generic (bool) – if True, indicates that the specific attributes of the exhibit are irrelevant in the context of the Holding where the exhibit is being referenced.

Evidence

Inheritance diagram of authorityspoke.evidence.Evidence
class authorityspoke.evidence.Evidence(exhibit=None, to_effect=None, name=None, absent=False, generic=False, anchors=<factory>)

An Exhibit admitted by a court to aid a factual determination.

Parameters
  • exhibit (Optional[Exhibit]) – the thing that is being used to aid a factual determination

  • to_effect (Optional[Fact]) – the Fact finding that would be supported by the evidence. If the Fact object includes a non-null standard_of_proof attribute, it indicates that that the evidence would support a factual finding by that standard of proof.

  • name (Optional[str]) – a string identifier

  • absent (bool) – if True, indicates that no evidence meeting the description has been admitted, regardless of whether a corresponding Exhibit has been presented

  • generic (bool) – if True, indicates that the specific attributes of the evidence are irrelevant in the context of the Holding where the evidence is being referenced.

Pleadings

Inheritance diagram of authorityspoke.pleadings.Pleading
class authorityspoke.pleadings.Pleading(filer=None, name=None, absent=False, generic=False)

A document filed by a party to make Allegations.

Parameters
  • filer (Optional[Entity]) – the Entity that the pleading references as having filed it, regardless of any questions about the identification of the filer.

  • name (Optional[str]) –

  • absent (bool) –

  • generic (bool) –

Allegations

Inheritance diagram of authorityspoke.pleadings.Allegation
class authorityspoke.pleadings.Allegation(statement=None, pleading=None, name=None, absent=False, generic=False)

A formal assertion of a Fact.

May be included by a party in a Pleading to establish a cause of action.

Parameters