-
Notifications
You must be signed in to change notification settings - Fork 2
Relations
This page summarizes the work and discussions on Semantic Relations from the technological and implementation perspective:
rules
allowedEntitiesPattern: [
[EntityEnums.Class.Action, EntityEnums.Class.Action],
[EntityEnums.Class.Concept, EntityEnums.Class.Concept],
],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: true,
multiple: true,
cloudType: false,
treeType: true,
attributes: [],
examples
[
{type: RelationType.Superclass, entityIds: ["pug", "dog"]},
{type: RelationType.Superclass, entityIds: ["poodle", "dog"]},
{type: RelationType.Superclass, entityIds: ["dog", "mammal"]},
{type: RelationType.Superclass, entityIds: ["dog", "human companion"]},
{type: RelationType.Superclass, entityIds: ["cat", "mammal"]},
{type: RelationType.Superclass, entityIds: ["mammal", "animal"]},
{type: RelationType.Superclass, entityIds: ["animal", "life form"]},
{type: RelationType.Superclass, entityIds: ["life form", "everything"]},
]
rules
allowedEntitiesPattern: [[EntityEnums.Class.Location, EntityEnums.Class.Location]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: true,
multiple: true,
cloudType: false,
treeType: true,
attributes: [],
example
[
{type: RelationType.SuperordinateLocation, entityIds: ["Brno", "South Moravia"]},
{type: RelationType.SuperordinateLocation, entityIds: ["Brno", "Margraviate of Moravia"]},
{type: RelationType.SuperordinateLocation, entityIds: ["South Moravia", "Czech Republic"]},
{type: RelationType.SuperordinateLocation, entityIds: ["House of David", "Brno"]},
]
rules
allowedEntitiesPattern: [[EntityEnums.Class.Action], [EntityEnums.Class.Concept]],
allowedSameEntityEnums.ClassesOnly: false,
asymmetrical: false,
multiple: false,
cloudType: true,
treeType: false,
attributes: [],
example
[
{type: RelationType.Synonym, entityIds: ["dog", "pes", "doggie", "hafík"]},
]
rules
allowedEntitiesPattern: [
[EntityEnums.Class.Action, EntityEnums.Class.Action],
[EntityEnums.Class.Concept, EntityEnums.Class.Concept],
],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: false,
multiple: true,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.Antonym, entityIds: ["big", "small"]},
{type: RelationType.Antonym, entityIds: ["to starve", "to eat"]},
]
A verb that indicates more precisely the manner of doing something by replacing a verb of a more generalized meaning. E.g, ‘Stroll’ is a troponym of ‘walk’, since it involves a slow and relaxed sort of walking.
rules
allowedEntitiesPattern: [[EntityEnums.Class.Action]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: false,
multiple: false,
cloudType: true,
treeType: false,
attributes: [],
example
[
{type: RelationType.Troponym, entityIds: ["talk", "gossip", "scream", "whisper"]},
]
rules
allowedEntitiesPattern: [[EntityEnums.Class.Concept, EntityEnums.Class.Concept]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.PropertyReciprocal, entityIds: []},
]
rules
allowedEntitiesPattern: [[EntityEnums.Class.Action, EntityEnums.Class.Action]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.SubjectActant1Reciprocal, entityIds: ["talk", "listen"]},
]
rules
allowedEntitiesPattern: [
[EntityEnums.Class.Action, EntityEnums.Class.Concept],
],
allowedSameEntityEnums.ClassesOnly: false,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.ActionEventEquivalent, entityIds: []},
]
rules
allowedEntitiesPattern: [], // any combination is allowed
allowedSameEntityEnums.ClassesOnly: false,
asymmetrical: false,
multiple: true,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.Related, entityIds: ["pen", "paper"]},
{type: RelationType.Related, entityIds: ["paper", "to write"]},
{type: RelationType.Related, entityIds: ["paper", "banknote"]},
]
rules
allowedEntitiesPattern: [
[EntityEnums.Class.Person, EntityEnums.Class.Concept],
[EntityEnums.Class.Location, EntityEnums.Class.Concept],
[EntityEnums.Class.Object, EntityEnums.Class.Concept],
[EntityEnums.Class.Group, EntityEnums.Class.Concept],
[EntityEnums.Class.Being, EntityEnums.Class.Concept],
[EntityEnums.Class.Event, EntityEnums.Class.Concept],
[EntityEnums.Class.Statement, EntityEnums.Class.Concept],
[EntityEnums.Class.Territory, EntityEnums.Class.Concept],
[EntityEnums.Class.Resource, EntityEnums.Class.Concept],
],
allowedSameEntityEnums.ClassesOnly: false,
asymmetrical: true,
multiple: true,
cloudType: false,
treeType: true,
attributes: [],
example
[
{type: RelationType.Classification, entityIds: ["P:David", "C:human"]},
{type: RelationType.Classification, entityIds: ["O:pen", "C:pen"]},
{type: RelationType.Classification, entityIds: ["L:David's home", "C:townhouse"]},
]
rules
allowedEntitiesPattern: [], // any combination is allowed
allowedSameEntityEnums.ClassesOnly: false,
asymmetrical: false,
multiple: true,
cloudType: true,
treeType: false,
attributes: [Certainty],
example
[
{type: RelationType.Identification, entityIds: ["David from text 1", "David from text 2"], certainty: [Certainty.Certain]},
{type: RelationType.Identification, entityIds: ["David from text 1", "David from text 14"], certainty: [Certainty.AlmostCertain]},
{type: RelationType.Identification, entityIds: ["David from text 2", "Batman"], certainty: [Certainty.Possible]},
{type: RelationType.Identification, entityIds: ["Batman", "Spiderman"], certainty: [Certainty.False]},
]
Holonymy is part -> whole relation. It is needed e.g. to study places (real-life example on gates of a religious house in this article): e.g. an interrogation happens at the gate of a religious house. Here, of course, it is not enough to know that this happened at a C gate; we also need to maintain the relation to the C "religious house" (i.e. we need to know that this L gate was a gate of a religious house). This relation if of course is not one of superclass: the C "gate of a religious house" is not an instance of a religious house (hypernymy aka superclass), but a part of one (holonymy). Solution: this Location "gate of Sant'Eustorgio convent in Milan" has the class C "gate of a religious house", and this C "gate of a religious house" has the holonym C religious house.
rules
allowedEntitiesPattern: [[EntityEnums.Class.Concept, EntityEnums.Class.Concept]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: true,
multiple: true,
cloudType: false,
treeType: true,
attributes: [],
example
[
{type: RelationType.Holonym, entityIds: ["gate of a religious house", "religious house"]},
]
Implication (aka entailment, but I take the liberty of choosing a more general-usage word) means that an action implies another. E.g., A "entered" (a space) also implies "was moving", and "was drunk" implies "was (previously) drinking alcohol". It is essentially there to enrich data with implied DDB2 relations (BTW at elvl4).
rules
allowedEntitiesPattern: [[EntityEnums.Class.Action, EntityEnums.Class.Action]],
allowedSameEntityEnums.ClassesOnly: true,
asymmetrical: true,
multiple: true,
cloudType: false,
treeType: true,
attributes: [],
example
[
{type: RelationType.Implication, entityIds: ["entered", "moved"]},
{type: RelationType.Implication, entityIds: ["was drunk", "was drinking (before)"]},
]
Relations on FE are generated and set up by attributes in packages/shared/types/relation.ts
Conditions are processed in this order:
- is cloudType
- is treeType
- is multiple
Order of relations is preserved in packages/shared/enums/relations.ts
const EntityDetailTypes
-> order and what relations are shown in detail
const TooltipTypes
-> order and what relations are shown in tooltip
"Pure" Entity Relations
- models in shared/types/relations.ts
- API endpoints
- BE implementation
- GUI design and implementation in Detail
In-Statement "Relations" (actant classifications and identifications)
- Updated IStatement model + BE implementation
- Updated IResponseStatement model (just add entityIds) + BE implementation
- GUI design + implementation
In-Statement "Relations" for Details
- Extended IResponseDetail model
- BE implementation
- GUI design Used in in-statement relations in Detail
- Implementation
- Design Extended Relation section for Entity Detail
EntityTag Tooltip info
- IResponseTagInfo model
- BE implementation
- API endpoint
- GUI design
- GUI implementation - new query for the component
Parsing (@tom)
Later
- Validate relations based on the RelationRule dictionaries
- Apply relations to the template system
- Test relations in GUI