Downloads · 30 days
10
20% of all-time downloads
dansachs/indo-religiolect-bert-v2
indo-religiolect-bert-v2 is a text classification model from dansachs. Use it when you need a label for a piece of text. The card lists the license as mit.
A fine-tuned BERT model for classifying Indonesian text into three distinct religious denominations: Islam, Catholicism, and Protestantism.
Downloads · 30 days
10
20% of all-time downloads
All-time downloads
50
Public
Parameters
111M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
A fine-tuned BERT model for classifying Indonesian text into three distinct religious denominations: Islam, Catholicism, and Protestantism.
This model uses IndoBERT (Indonesian BERT) as the base model and is fine-tuned to identify unique "religiolects" (religious dialects) used by different faith communities in Indonesia. The model successfully distinguishes between groups with high accuracy, even navigating the shared vocabulary between Catholic and Protestant discourse.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
import torch.nn.functional as F
# Load model and tokenizer
MODEL_NAME = "dansachs/indo-religiolect-bert-v2"
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME)
# Predict
text = "Allah adalah Tuhan yang Maha Esa"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probs = F.softmax(logits, dim=1).numpy()[0]
labels = ['Islam', 'Catholic', 'Protestant']
prediction = labels[probs.argmax()]
print(f"Prediction: {prediction}")
print(f"Confidence: {probs.max():.1%}")
Clone the repository and use the provided scripts:
# Interactive mode
python interactive/predict.py
# Batch processing
python interactive/predict_batch.py --file texts.txt --output results.csv
The model was trained on the Indonesian Religious Corpus dataset:
🔗 Dataset: dansachs/indonesian-religious-corpus
The dataset contains ~3 million clean sentences scraped from authoritative religious websites, with metadata including denomination, location, date, and source links.
🔗 GitHub Repository: dansachs/indo-religiolects
The repository includes:
If you use this model in your research, please cite:
@misc{indo-religiolect-bert-v2,
title={Indo-Religiolect-BERT V2: A Fine-tuned Model for Indonesian Religious Text Classification},
author={Sachs, Dan},
year={2025},
howpublished={\url{https://huggingface.co/dansachs/indo-religiolect-bert-v2}}
}
MIT License - For academic research purposes.