resume-summerization-classification/bangla_ai_detector
018
Bangla AI vs Human Writing Detector — BanglaBERT
Fine-tuned BanglaBERT for binary classification of Bangla text as AI-generated or human-written. Developed as part of the Onneshon thesis project at Bangladesh University of Professionals (BUP).
Given the full text of a Bangla resume, the model predicts whether it was written by a human or generated by an AI system, along with a confidence score.
Model Details
Dataset
Trained on Onneshon — an original Bangla resume dataset:
- Human resumes: 50 resumes written by Bangladeshi professionals (resume51–resume100)
- AI resumes: 50 resumes generated by AI systems (resume1–resume50)
- Total: 100 resumes, split 70/15/15 (train/val/test), stratified
Published on Mendeley Data: DOI: 10.17632/4md7bx6fd7.1
Labels
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("your-username/bangla-ai-detector")
model = AutoModelForSequenceClassification.from_pretrained("your-username/bangla-ai-detector")
model.eval()
def predict(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.softmax(logits, dim=1)[0]
label = model.config.id2label[logits.argmax().item()]
return {
"label": label,
"confidence": f"{probs.max().item()*100:.1f}%",
"P(Human)": f"{probs[0].item()*100:.1f}%",
"P(AI)": f"{probs[1].item()*100:.1f}%",
}
# Example
resume_text = "আমি একজন অভিজ্ঞ সফ্টওয়্যার ইঞ্জিনিয়ার। গত পাঁচ বছর ধরে জাভা এবং স্প্রিং বুট দিয়ে কাজ করছি।"
print(predict(resume_text))
# Output: {'label': 'Human', 'confidence': '87.3%', 'P(Human)': '87.3%', 'P(AI)': '12.7%'}Preprocessing
Before passing text to the model, strip any annotation tags if present (these are specific to the Onneshon dataset format):
import re
def clean_resume(text):
text = re.sub(r'\[Info_Start\].*?\[Info_End\]', '', text, flags=re.DOTALL)
text = re.sub(r'\[(Objective|Experience|Expericence|Education|Skill|section)\]', '', text)
text = re.sub(r'\s+', ' ', text).strip()
return textLimitations
- Small dataset: Only 100 resumes (70 training). Binary accuracy estimates have high variance — results should be interpreted with caution.
- Domain-specific: Trained exclusively on Bangla resumes. Performance on other Bangla document types (news, social media, etc.) is untested.
- AI source unknown: The AI resumes were generated by a specific AI system. The model may not generalize to resumes generated by different LLMs not seen during training.
- Token limit: Resumes longer than 512 tokens are truncated. Very long resumes may lose tail content.
- Binary only: Cannot distinguish which AI system generated the text — only Human vs AI.
Citation
@misc{onneshon2026,
title = {Onneshon: A Bangla Resume NLP Dataset},
author = {Tanvir and Shruti Khisa and Shaira Akther Diba and Fazli Rabbi Noor},
year = {2026},
doi = {10.17632/4md7bx6fd7.1},
publisher = {Mendeley Data}
}
@inproceedings{bhattacharjee-etal-2022-banglabert,
title = {BanglaBERT: Language Model Pretraining and Benchmarks for Low-Resource Language Understanding Evaluation in Bangla},
author = {Bhattacharjee, Abhik and Hasan, Tahmid and Ahmad, Wasi and Mubasshir, Kazi Samin and Islam, Md Saiful and Iqbal, Anindya and Rahman, M. Sohel and Shahriyar, Rifat},
booktitle = {Findings of the Association for Computational Linguistics: NAACL 2022},
year = {2022},
pages = {1318--1327}
}Project
Part of the Onneshon thesis project — a Bangla NLP pipeline for resume processing.
- Dataset: Mendeley Data DOI: 10.17632/4md7bx6fd7.1
- Institution: Bangladesh University of Professionals (BUP), Dhaka, Bangladesh
- Supervisor: Rumana Yasmin, Lecturer, CSE Department, BUP
