Nasty.Semantic.SRL.CoreArgumentMapper (Nasty v0.3.0)
View SourceGeneric mapping from syntactic arguments to semantic roles.
Maps clause components (subject, objects, complements) to semantic roles based on voice and argument position:
Active Voice
- Subject → Agent
- Object 1 → Patient/Theme
- Object 2 → Recipient
Passive Voice
- Subject → Patient
- By-phrase → Agent (if present)
Summary
Functions
Extracts core semantic roles from a clause based on voice.
Functions
@spec extract_core_roles(Nasty.AST.Clause.t(), :active | :passive | :unknown) :: [ Nasty.AST.Semantic.Role.t() ]
Extracts core semantic roles from a clause based on voice.
Core roles are essential arguments of the predicate (agent, patient, theme, recipient, etc.)