Views
No views yet
PLAYER, INJURY, STATUS, and TEAM from sports news using a Weak Supervision approach.PLAYER: Name of the injured player.INJURY: Type of injury (e.g., "hamstring", "concussion").STATUS: Injury status (e.g., "questionable", "out", "placed on IR").TEAM: Team name (e.g., "Packers", "New York Giants").1from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
2
3model_id = "maxo99/sports-injury-ner"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForTokenClassification.from_pretrained(model_id)
6
7nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
8
9text = "Packers QB Aaron Rodgers is questionable with a toe injury."
10results = nlp(text)
11print(results)| Metric | Score |
|---|---|
| F1 Score | 94.98% |
| Precision | 95.41% |
| Recall | 94.55% |
| Accuracy | 97.06% |
bert-large-NER (for Player/Team) and keyword matching (for Injury/Status).microsoft/SportsBERT fine-tuned on the combined Silver + Gold dataset.Metadata > Keywords > BERT NER.1# 1. Install dependencies
2uv sync
3
4# 2. Run the full pipeline (Data Gen -> Validation -> Training)
5dvc repro train_model