Nasty.AST.Semantic.Relation (Nasty v0.3.0)
View SourceRelation node representing a semantic relationship between entities.
Relations connect entities with typed relationships (e.g., "works_for", "located_in").
Summary
Types
@type relation_type() :: atom()
Relation type classification.
Common semantic relations:
:is_a- Type/class membership ("cat is an animal"):part_of- Part-whole relationship ("wheel is part of car"):located_in- Spatial containment ("Paris is in France"):works_for- Employment ("Alice works for Company"):founded_by- Creation relationship:owns- Ownership:married_to- Personal relationship- Custom relation types as atoms
@type t() :: %Nasty.AST.Semantic.Relation{ confidence: float() | nil, source: Nasty.AST.Semantic.Entity.t(), span: Nasty.AST.Node.span(), target: Nasty.AST.Semantic.Entity.t(), type: relation_type() }