Indonesian Medical NER

Indonesian Medical NER is a fine-tuned IndoBERT model for Named Entity Recognition (NER) on Indonesian medical complaint text. The model is designed to identify medical-related entities from patient complaints written in Indonesian.

Detected entity categories include:

  • GEJALA (Symptoms)
  • PENYAKIT (Diseases)
  • OBAT (Medications)
  • LOKASI (Body locations)
  • TINDAKAN (Medical actions)

Model Details

Model Description

This model was fine-tuned using indobenchmark/indobert-base-p1 on a custom Indonesian medical NER dataset collected from online health consultation text. The dataset was built through web scraping and semi-automatic annotation using Large Language Models (LLM), followed by manual correction and validation.

The model uses BIO tagging format and is trained for token classification tasks.

  • Developed by: Muhammad Faruqi
  • Model type: IndoBERT Token Classification
  • Language: Indonesian
  • License: Apache-2.0
  • Finetuned from model: indobenchmark/indobert-base-p1

Intended Use

This model can be used for:

  • Medical entity extraction
  • Indonesian healthcare NLP research
  • Clinical text preprocessing
  • Medical chatbot systems
  • Healthcare information extraction

Out-of-Scope Use

This model is not intended for:

  • Medical diagnosis
  • Clinical decision making
  • Emergency healthcare systems
  • Replacing professional medical consultation

Predictions generated by this model may contain errors and should not be considered medical advice.

Training Details

Training Data

The training dataset consists of Indonesian patient complaint text collected from online healthcare consultation platforms. The data was annotated using BIO tagging format with the following labels:

Entity Description
GEJALA Symptom entities
PENYAKIT Disease entities
OBAT Medication entities
LOKASI Anatomical/body location entities
TINDAKAN Medical action/treatment entities

Training Procedure

The model was fine-tuned using weighted cross entropy loss to improve recognition performance on minority entity classes such as LOKASI and TINDAKAN.

Training Hyperparameters

Parameter Value
Learning Rate 3e-5
Batch Size 8
Epochs 10
Weight Decay 0.01
Warmup Ratio 0.1
LR Scheduler Cosine
Dropout 0.2
Evaluation Strategy Steps
Save Steps 100
Loss Function Weighted CrossEntropyLoss

Evaluation

Metrics

Evaluation was performed using:

  • Precision
  • Recall
  • F1-score

Results

Metric Score
Precision 0.6278
Recall 0.7240
F1-score 0.6725

Classification Report

Entity Precision Recall F1-score
GEJALA 0.6464 0.7492 0.6941
LOKASI 0.3636 0.5143 0.4260
OBAT 0.6761 0.7273 0.7007
PENYAKIT 0.7473 0.7640 0.7556
TINDAKAN 0.5373 0.7059 0.6102

Usage

from transformers import pipeline

pipe = pipeline(
    "token-classification",
    model="mfaruqi/indonesian-medical-ner",
    aggregation_strategy="simple"
)

text = "Saya mengalami nyeri perut dan sudah minum paracetamol."

result = pipe(text)

print(result)

Example Output

[
  {
    'entity_group': 'GEJALA',
    'word': 'nyeri perut'
  },
  {
    'entity_group': 'OBAT',
    'word': 'paracetamol'
  }
]

Limitations

  • Performance on rare entities is still limited.
  • Informal or highly ambiguous sentences may reduce prediction quality.
  • Multi-token location entities are harder to detect consistently.
  • The model was trained on Indonesian healthcare complaint text and may not generalize well outside the medical domain.

Citation

@misc{faruqi2026indonesianmedicalner,
  author = {Muhammad Faruqi},
  title = {Indonesian Medical NER},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/mfaruqi/indonesian-medical-ner}}
}

Contact

For research or collaboration purposes:

Downloads last month
67
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mfaruqi/indonesian-medical-ner

Finetuned
(149)
this model

Dataset used to train mfaruqi/indonesian-medical-ner