Downloads · 30 days
0
bodyanats/booknlp-plus-speaker-attribution
booknlp-plus-speaker-attribution is a machine learning model from bodyanats. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Speaker attribution models trained on the PDNC dataset using leave-x-out cross-validation.
Downloads · 30 days
0
Access
Public
Updated Dec 4, 2025
Repo size
2.2 GB
Likes
1
Public
Click a slice to open those files.
.model2.2 GB · 100%
From the Hugging Face model README
Speaker attribution models trained on the PDNC dataset using leave-x-out cross-validation.
| Metric | Mean (5-fold) | Best Fold (#2) |
|---|---|---|
| Test Accuracy | 60.54% | 72.49% |
| Test F1 | 0.5352 | 0.6852 |
| Fold | Test Accuracy | Test F1 | Note |
|---|---|---|---|
| 0 | 62.27% | 0.5580 | |
| 1 | 54.27% | 0.4427 | |
| 2 | 72.49% | 0.6852 | ⭐ Best |
| 3 | 56.86% | 0.4741 | |
| 4 | 56.80% | 0.5158 |
This repository contains 5 fold models trained with leave-x-out split:
split_2 with 72.49% accuracyleave-x-out/
├── split_0/best_model.model
├── split_1/best_model.model
├── split_2/best_model.model
├── split_3/best_model.model
└── split_4/best_model.model
evaluation_results.json
from huggingface_hub import model_info
info = model_info("bodyanats/booknlp-plus-speaker-attribution")
folds = info.card_data["folds"]
# Show all folds
for fold_id, data in folds.items():
print(f"Fold {fold_id}: Acc={data['accuracy']:.2%}, F1={data['f1']:.4f}")
# Get best fold
best_fold = info.card_data["best_fold"]
print(f"\nBest: Fold {best_fold} ({folds[str(best_fold)]['accuracy']:.2%})")
from huggingface_hub import model_info, hf_hub_download
info = model_info("bodyanats/booknlp-plus-speaker-attribution")
best_path = info.card_data["best_model_path"]
model_path = hf_hub_download(repo_id="bodyanats/booknlp-plus-speaker-attribution", filename=best_path)
from huggingface_hub import model_info, hf_hub_download
info = model_info("bodyanats/booknlp-plus-speaker-attribution")
fold_id = "2" # Choose fold 0-4
model_path = hf_hub_download(
repo_id="bodyanats/booknlp-plus-speaker-attribution",
filename=info.card_data["folds"][fold_id]["model_path"]
)
from huggingface_hub import snapshot_download
local_dir = snapshot_download(repo_id="bodyanats/booknlp-plus-speaker-attribution")
Trained using the speaker-attribution-acl2023 repository.
Paper: Improving Automatic Quotation Attribution in Literary Novels (ACL 2023)