allenai/scicite
Updated • 930 • 4
How to use hongccccccc/scibert-citation-background-classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="hongccccccc/scibert-citation-background-classifier") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("hongccccccc/scibert-citation-background-classifier")
model = AutoModelForSequenceClassification.from_pretrained("hongccccccc/scibert-citation-background-classifier")allenai/scibert_scivocab_uncased fine-tuned as a binary classifier of citation intent: does a citation sentence cite prior work as background (BACKGROUND) or for any other reason (NOT_BACKGROUND)?
| id | label | meaning |
|---|---|---|
| 0 | NOT_BACKGROUND | citation used for method, comparison, extension, motivation… |
| 1 | BACKGROUND | citation provides background/context for the citing paper |
from transformers import pipeline
clf = pipeline("text-classification", model="hongccccccc/scibert-citation-background-classifier")
clf("Deep learning has achieved remarkable success in many NLP tasks [1, 2].")
# [{'label': 'BACKGROUND', 'score': ...}]
BertForSequenceClassification, single-label, 2 classes)BACKGROUNDtransformers 4.32.0F1 score of 0.81 on a held-out test set (80-20 train-test split of the combined dataset).
Base model
allenai/scibert_scivocab_uncased