bigbio/bionlp_st_2013_pc
Viewer • Updated • 1.05k • 110 • 1
A token-classification model fine-tuned on the BioNLP 2013 Pathway Curation (BioNLP13PC) corpus for biomedical named entity recognition. The model tags mentions of chemicals, gene/protein products, complexes, and cellular components in scientific text.
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
model_name = "HowML/bert-ner-bionlp13pc-fine-tuned"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
print(model.id2label)
"""
{
"0": "O",
"1": "B-CHED",
"2": "B-COMP",
"3": "B-Complex",
"4": "B-PRGE",
"5": "I-CHED",
"6": "I-COMP",
"7": "I-Complex",
"8": "I-PRGE"
}
"""
tokenized_inputs = tokenizer(text, return_tensors="pt")
outputs = model(**tokenized_inputs)
predictions = torch.argmax(outputs.logits, dim=-1)
"""
example output:
[CLS] AKT regulate NF ##kappa ##B [SEP]
predictions = tensor([[0, 4, 0, 4, 8, 8, 0]])
"""
| Task | Named Entity Recognition (token classification) |
| Corpus | BioNLP13PC (BioNLP Shared Task 2013 — Pathway Curation) |
| Base model | dmis-lab/biobert-base-cased-v1.1 |
| Language | English (biomedical) |
| Labeling scheme | BIO (B-, I-, O) |
| Tag | Entity | Description |
|---|---|---|
CHED |
Chemical / Drug | Simple chemical entities |
PRGE |
Gene / Protein | Genes and gene products (proteins) |
COMP |
Cellular Component | Subcellular locations and structures |
Complex |
Complex | Macromolecular complexes |
Evaluated on the BioNLP13PC test set (entity-level, span-based).
| Entity | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| CHED | 0.83 | 0.86 | 0.84 | 857 |
| COMP | 0.88 | 0.89 | 0.88 | 332 |
| Complex | 0.75 | 0.75 | 0.75 | 528 |
| PRGE | 0.87 | 0.91 | 0.89 | 3586 |
| micro avg | 0.85 | 0.89 | 0.87 | 5303 |
| macro avg | 0.83 | 0.85 | 0.84 | 5303 |
| weighted avg | 0.85 | 0.89 | 0.87 | 5303 |
Base model
dmis-lab/biobert-base-cased-v1.1