Relation#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Relation[source]#
Bases:
StrictOne staging fact, written as a sentence.
Authored as
alice left_of bobrather than a three-key mapping because staging is read far more often than it is written, and a sentence is legible at a glance.- Raises:
ValidationError – The subject and object are the same actor. No predicate here is meaningful reflexively.
Example
>>> from scenet import Predicate, Relation >>> relation = Relation(subject="a", predicate="left_of", object="b") >>> relation.predicate is Predicate.LEFT_OF True
See also
Predicate, every relation there is.