Nasty.Language.English.SRLConfig (Nasty v0.3.0)
View SourceEnglish-specific configuration for Semantic Role Labeling.
Provides:
- Passive auxiliary patterns
- Passive participle detection
- Temporal adverb recognition
- Preposition-to-role mappings
Summary
Functions
Returns the complete configuration map for use with generic SRL modules.
Check if a token is a passive auxiliary.
Check if a token is a passive participle.
Returns the preposition-to-role mapping.
Check if text is a temporal adverb.
Functions
@spec config() :: Nasty.Semantic.SRL.Labeler.language_config()
Returns the complete configuration map for use with generic SRL modules.
@spec passive_auxiliary?(Nasty.AST.Token.t()) :: boolean()
Check if a token is a passive auxiliary.
Returns true for forms of "be" (was, were, is, are, been, being, be).
@spec passive_participle?(Nasty.AST.Token.t()) :: boolean()
Check if a token is a passive participle.
Heuristics:
- Morphology indicates :past_participle
- Ends in -ed (regular verbs)
- Ends in -en (some irregular verbs: written, taken, etc.)
- Has POS tag indicating past participle (if available)
- If it's a verb (not -ing form), assume it could be participle (for irregular verbs like "read", "cut", "put" that don't change form)
@spec preposition_role_map() :: map()
Returns the preposition-to-role mapping.
Maps preposition strings (lowercase) to semantic role atoms.
Check if text is a temporal adverb.
Returns true for adverbs like "yesterday", "now", "always", etc.