🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Semantic Role Labeling: Who Did What to Whom

Natural Language ProcessingSemantic Role Labeling: Who Did What to WhomđŸŸĸ Free Lesson

Advertisement

Semantic Role Labeling: Who Did What to Whom

Module: Natural Language Processing | Difficulty: Advanced

PropBank Args

SRL as Sequence Labeling

Evaluation

ModelCoNLL-2012 F1
BERT86.2
RoBERTa88.5
import torch
import torch.nn as nn

class SRLModel(nn.Module):
    def __init__(self, bert_model, n_roles):
        super().__init__()
        self.bert = bert_model
        self.role_classifier = nn.Linear(768, n_roles)
    def forward(self, input_ids, attention_mask):
        outputs = self.bert(input_ids, attention_mask=attention_mask)
        hidden = outputs.last_hidden_state
        return self.role_classifier(hidden)

Research Insight: SRL provides shallow semantic understanding of text. Neural models improved SRL by 10+ F1 points by learning contextual representations. The key insight is that SRL benefits from pre-trained language models because argument structure is partially captured by language modeling.

Need Expert NLP Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement