An object encapsulating a relation extracted from text. For example buy(John, car).

Implements

Properties

Arguments of the relation (subject, possibly an object).

feats: Map<string, string>

Any features of the relation e.g. modality: can.

id: string

ID of the relation used to refer to it from other objects.

name: string

Name of the relation, e.g. eat for eat a pizza or good for a good pizza.

sentiment: null | Sentiment

Sentiment of this relation. null if not requested.

support: RelationSupport[]

Tecto-tokens of all the mentions of the relations (restricted to its head). Empty if not requested.

textRepr: string

Human redable representation of the relation, e.g. eat-not(SUBJ:John, DOBJ:pizza).

type: string

One of Relation.TYPE_ATTR, Relation.TYPE_RELATION, Relation.TYPE_EXTERNAL.

vectors: null | Vector[]

Optional vectors for this relation.

FEAT_MODALITY: "modality"

Feature storing info about modality.

FEAT_NEGATED: "negated"

Key presence signifies it is a negated word, value = True.

TYPE_ATTR: "attr"

Attribute relation (e.g. good(pizza) for good pizza, pizza is good).

TYPE_EXTERNAL: "external"

Relation where at least one argument is outside of the the document (e.g. between pizza in the document and food item in the knowledgebase).

TYPE_RELATION: "relation"

Verbal relation (e.g. eat(pizza) for eat a pizza.

Methods