Views
No views yet
1from transformers import AutoTokenizer, AutoModelForTokenClassification
2from transformers import pipeline
3
4tokenizer = AutoTokenizer.from_pretrained("dell-research-harvard/byline-detection")
5model = AutoModelForTokenClassification.from_pretrained("dell-research-harvard/byline-detection")
6
7nlp = pipeline("ner", model=model, tokenizer=tokenizer)
8example = "NEW ORLEANS, (UP) — The Roman Catholic Church, through its leaders in the United States today appealed "
9
10ner_results = nlp(example)
11print(ner_results)| Dataset | Count |
|---|---|
| Train | 1,392 |
| Dev | 464 |
| Test | 464 |
| Statistic | Result |
|---|---|
| F1 | 0.96 |
@misc{silcock2024newswirelargescalestructureddatabase,
title={Newswire: A Large-Scale Structured Database of a Century of Historical News},
author={Emily Silcock and Abhishek Arora and Luca D'Amico-Wong and Melissa Dell},
year={2024},
eprint={2406.09490},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2406.09490},
}