NorBERT3-fine-ABSA

This model is a fine-tuned version of NorBERT3-large, applied on the sentence-level NorPaC_absa dataset. The model is trained on a total of 66 unique aspect+sentiment labels. Details with code and guidelines can be found in our GitHub repository.

Example Usage

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("ltg/norbert3-fine-absa")
model = AutoModelForSequenceClassification.from_pretrained("ltg/norbert3-fine-absa", trust_remote_code=True)

model.eval()

text = "fastlegen lytter til meg, men jeg synes ventetiden er for lang."

# tokenize input
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)

# Run inference
with torch.no_grad():
    outputs = model(**inputs)

# Get predictions
threshold = 0.5
probs = torch.sigmoid(outputs.logits).squeeze()
predictions = [model.config.id2label[i] for i, prob in enumerate(probs) if prob > threshold]
print(predictions)
# -> ['ppr_pos', 'wtp_neg'] (patient-provider/staff relationships:positive, waiting time for appointment:negative)

Class labels

Aspect NorPaCabsa GP SMH
Full name Short-name # % # % # %
Healthcare providers and staff
    Competence of providers cp 401 7.2 247 8.9 154 5.5
    Information sharing with patients isp 88 1.6 44 1.6 44 1.6
    Language lang 13 0.2 12 0.4 1 0.1
    Patient–provider/staff relationships ppr 917 16.5 412 14.9 505 18.0
    Time Spent with healthcare Professionals tshp 265 4.8 102 3.7 163 5.8
Organization of health services
    External cooperation with other services excos 128 2.3 100 3.6 28 1.0
    Internal cooperation and communication incc 30 0.5 10 0.4 20 0.7
    Structure and routines sr 167 3.0 58 2.1 109 3.9
    System-level organization of health services slohs 193 3.5 101 3.7 92 3.3
    Duration of treatment and stays dur 77 1.4 – – 77 2.8
Access and availability
    Geographical distance to GP office gd 19 0.3 19 0.7 – –
    Telephone and digital communication td 181 3.3 181 6.6 – –
    Waiting times in clinic wtc 54 1.0 54 2.0 – –
    Waiting time for appointment wtp 121 2.2 121 4.4 – –
    Workload wol 66 1.2 66 2.4 – –
Environment and facilities
    Physical and psychosocial environment ppe 110 2.0 16 0.6 94 3.4
    Activities act 113 2.0 – – 113 4.0
    Interaction with other patients iop 51 0.9 – – 51 1.8
    Quality of food and meal routines qfm 90 1.6 – – 90 3.2
Treatment
    Medication med 106 1.9 35 1.3 71 2.5
    Stability and continuity in treatment sct 482 8.7 392 14.2 90 3.2
    Forced treatment / coercion ftc 36 0.7 – – 36 1.3
Uncategorized / Top-level aspects
    Outcome and impact of treatment / stay oits 319 5.7 – – 319 11.4
    Patient involvement and participation pip 68 1.2 – – 68 2.4
    General gen 1376 24.7 727 26.3 649 23.2
    No aspect / Neutral no-asp 92 1.7 64 2.3 28 1.0
Total 5563 100.0 2761 100.0 2802 100.0

Evaluation

For evaluation metrics, please refer to our paper (link coming).

Citation

Coming.

Downloads last month
155
Safetensors
Model size
0.4B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ltg/norbert3-fine-absa

Base model

ltg/norbert3-large
Finetuned
(8)
this model

Collection including ltg/norbert3-fine-absa