Nasty.AST.Semantic.Role (Nasty v0.3.0)
View SourceSemantic role assigned to a phrase in relation to a predicate.
Represents the semantic function of a participant or circumstance in a predicate-argument structure (e.g., Agent, Patient, Location).
Based on PropBank and VerbNet role inventories.
Summary
Functions
Checks if role is an adjunct (not a core argument).
Checks if role is a core argument (not an adjunct).
Creates a new semantic role.
Types
@type role_type() ::
:agent
| :patient
| :theme
| :experiencer
| :recipient
| :beneficiary
| :source
| :goal
| :location
| :time
| :manner
| :instrument
| :purpose
| :cause
| :comitative
Semantic role types.
Core roles (arguments)
:agent- Volitional causer/actor (typically subject of transitive):patient- Entity acted upon (typically direct object):theme- Entity undergoing action or in a state:experiencer- Entity experiencing a mental/perceptual state:recipient- Entity receiving something:beneficiary- Entity benefiting from action:source- Starting point of motion/transfer:goal- Endpoint of motion/transfer
Adjunct roles (modifiers)
:location- Place where action occurs:time- Time when action occurs:manner- How action is performed:instrument- Tool/means used:purpose- Reason/goal for action:cause- Reason/cause of action:comitative- Accompanying entity ("with X")
@type t() :: %Nasty.AST.Semantic.Role{ phrase: Nasty.AST.Phrase.t() | nil, span: Nasty.AST.Node.span(), text: String.t(), type: role_type() }
Functions
Checks if role is an adjunct (not a core argument).
Checks if role is a core argument (not an adjunct).
@spec new(role_type(), String.t(), Nasty.AST.Node.span(), keyword()) :: t()
Creates a new semantic role.