-
Notifications
You must be signed in to change notification settings - Fork 2
Relations
Adam Mertel edited this page Aug 18, 2022
·
24 revisions
This page summarizes the work and discussions on Semantic Relations from the technological and implementation perspective:
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: [Logic, 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]},
]
"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
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