--- base_model: bert-base-multilingual-cased tags: - persian-nlp - text-classification - traffic-crash-detection - crash-type-classification - bert - information-extraction license: apache-2.0 language: - fa pipeline_tag: text-classification inference: false --- # BERT-Crashtype-Classification **Fine-tuned BERT for classifying Persian social media texts into 9 crash types.** 📄 **Paper:** [Extracting traffic crash information from social media: an LLM-based approach](https://doi.org/10.1080/19427867.2026.2681104) – *Transportation Letters* (2026) --- ## 🎯 What it does Classifies a given Persian social media text into one of **9 types of traffic crashes**. ### 🏷️ Crash Types (9 Classes) 1. `vehicle with two-wheeled vehicle` 2. `Two-wheeled vehicle–pedestrian` 3. `vehicle with fixed object or ran off road` 4. `rollover or fall` 5. `multiple car` 6. `vehicle–animal` 7. `vehicle–pedestrian` 8. `vehicle with single other vehicle` 9. `two-wheeled vehicle with two-wheeled vehicle` ## ⚙️ Fine-tuning - **Base Model:** `bert-base-multilingual-cased` - **Data:** Proprietary Persian social media crash dataset (Damavand County, Iran) ## 📊 Performance | Task | Metric | Score | |------|--------|-------| | Crash Type Classification (9 classes) | Accuracy | **89.7%** | ## 🚀 Quick Start ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer model = AutoModelForSequenceClassification.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification") tokenizer = AutoTokenizer.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification") text = "تصادف دو خودرو در اتوبان" inputs = tokenizer(text, return_tensors="pt") outputs = model(**inputs) predicted_class = outputs.logits.argmax().item() # predicted_class is an integer from 0 to 8