-
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:
"Pure" Entity Relations
- models in shared/types/relations.ts
- API endpoints
- BE implementation #1186
- GUI design for relation handling in Detail 1218
- GUI implementation #1219
In-Statement "Relations" (actant classifications and identifications)
- Updated IStatement model + BE implementation
- Updated IResponseStatement model (just add entityIds) + BE implementation #1183
- GUI design + implementation #1184
In-Statement "Relations" for Details
- Extended IResponseDetail model
- BE implementation
- GUI design Used in in-statement relations in Detail #1216
- Implementation #1215
EntityTag Tooltip info
- IResponseTagInfo model
- BE implementation #1185
- API endpoint
- GUI design #1182
- GUI implementation - new query for the component
Parsing (@tom)
- Prepare testing dataset #1217
- Create endpoint responses for the testing dataset
Later
- Validate relations based on the RelationRule dictionaries
- Apply relations to the template system
- Test relations in GUI
rules
allowedEntitiesPattern: [
[EntityClass.Action, EntityClass.Action],
[EntityClass.Concept, EntityClass.Concept],
],
allowedSameEntityClassesOnly: 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: [[EntityClass.Location, EntityClass.Location]],
allowedSameEntityClassesOnly: 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: [[EntityClass.Action], [EntityClass.Concept]],
allowedSameEntityClassesOnly: false,
asymmetrical: false,
multiple: true,
cloudType: true,
treeType: false,
attributes: [],
example
[
{type: RelationType.Synonym, entityIds: ["dog", "pes", "doggie", "hafík"]},
]
rules
allowedEntitiesPattern: [
[EntityClass.Action, EntityClass.Action],
[EntityClass.Concept, EntityClass.Concept],
],
allowedSameEntityClassesOnly: 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"]},
]
rules
allowedEntitiesPattern: [[EntityClass.Action]],
allowedSameEntityClassesOnly: true,
asymmetrical: false,
multiple: true,
cloudType: true,
treeType: false,
attributes: [],
example
[
{type: RelationType.Troponym, entityIds: ["talk", "gossip", "scream", "whisper"]},
]
rules
allowedEntitiesPattern: [[EntityClass.Concept, EntityClass.Concept]],
allowedSameEntityClassesOnly: true,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.PropertyReciprocal, entityIds: []},
]
rules
allowedEntitiesPattern: [[EntityClass.Action, EntityClass.Action]],
allowedSameEntityClassesOnly: true,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.SubjectActantReciprocal, entityIds: ["talk", "listen"]},
]
rules
allowedEntitiesPattern: [
[EntityClass.Action, EntityClass.Concept],
[EntityClass.Concept, EntityClass.Action],
],
allowedSameEntityClassesOnly: false,
asymmetrical: false,
multiple: false,
cloudType: false,
treeType: false,
attributes: [],
example
[
{type: RelationType.ActionEventEquivalent, entityIds: []},
]
rules
allowedEntitiesPattern: [], // any combination is allowed
allowedSameEntityClassesOnly: 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: [
[EntityClass.Person, EntityClass.Concept],
[EntityClass.Location, EntityClass.Concept],
[EntityClass.Object, EntityClass.Concept],
[EntityClass.Group, EntityClass.Concept],
[EntityClass.Event, EntityClass.Concept],
[EntityClass.Statement, EntityClass.Concept],
[EntityClass.Territory, EntityClass.Concept],
[EntityClass.Resource, EntityClass.Concept],
],
allowedSameEntityClassesOnly: 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
allowedSameEntityClassesOnly: 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: [[EntityClass.Concept, EntityClass.Concept]],
allowedSameEntityClassesOnly: 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: [[EntityClass.Action, EntityClass.Action]],
allowedSameEntityClassesOnly: 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)"]},
]