Turkish Flood News Classifier (BERTurk fine-tune)

Binary classifier that decides whether a Turkish news article is reporting an actual flood event in Turkey (1) or not (0). Fine-tuned from dbmdz/bert-base-turkish-cased on a small curated corpus of Turkish flood news articles.

⚠️ This is a Phase 1 model — narrow, binary, trained on a modest dataset. A multi-class disaster classifier covering 7 disaster types (flood, earthquake, fire, landslide, avalanche, storm, sandstorm) is in development. See Roadmap.

Intended Use

  • Pre-filter for Turkish news pipelines — quickly drop non-flood articles before sending the remainder to a slower extraction step (e.g. an LLM that pulls location, severity, casualties).
  • Research baseline for Turkish disaster NLP.

Out-of-scope

  • Articles from outside Turkey (model was trained primarily on Turkish-domestic events).
  • Identifying disaster types other than flood — for storms, earthquakes, fires etc. this model will under-react.
  • Extracting structured information (province, casualties, severity) — the model only outputs a binary label. Pair with an extraction model or LLM.
  • Real-time social-media short text — corpus is news-article style.

How to use

from transformers import BertTokenizer, BertForSequenceClassification
import torch

tokenizer = BertTokenizer.from_pretrained("hakansabunis/turkish-flood-news-bert")
model = BertForSequenceClassification.from_pretrained("hakansabunis/turkish-flood-news-bert")
model.eval()

text = "Rize Çamlıhemşin'de aşırı yağış sonucu dere taştı, üç ev yıkıldı."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)

with torch.no_grad():
    logits = model(**inputs).logits
pred = int(torch.argmax(logits, dim=-1).item())
prob = torch.softmax(logits, dim=-1)[0, 1].item()

print(f"Flood event? {'YES' if pred == 1 else 'NO'}  (P(flood)={prob:.3f})")

Or with a pipeline:

from transformers import pipeline
clf = pipeline("text-classification", model="hakansabunis/turkish-flood-news-bert")
clf("Rize'de dere taştı, mahalle sular altında kaldı.")

Training data

A curated Turkish flood-news corpus assembled from:

  • The 1951 verified Turkish flood-event archive (1930–2020)
  • Web-scraped news from major Turkish outlets (Hürriyet, NTV, Milliyet, Sözcü, Anadolu Ajansı, Habertürk)
  • LLM-assisted pre-labeling with manual verification
Split Total Negative (0) Positive (1)
Train 574 296 278
Validation 71 38 33
Test 71 24 47
Total 716 358 358

Negative examples were curated to include adversarial cases:

  • Metaphorical use of "sel" (e.g. "gözyaşları sel oldu", "transfer fırtınası")
  • Foreign-country flood reports (e.g. Brazil, Greece)
  • Forecasts/warnings ("uyarı", "bekleniyor", "risk")
  • Past-event anniversaries

Training procedure

Hyperparameter Value
Base model dbmdz/bert-base-turkish-cased (110M params)
Epochs 4 (with early stopping, patience=2)
Batch size 16
Learning rate 2e-5
Optimizer AdamW
Warmup ratio 0.1
Weight decay 0.01
Max sequence length 512
Mixed precision FP16 (GPU)
Best-model selection by validation F1

Training was performed on a single NVIDIA RTX 3050 Laptop GPU (4GB VRAM) under WSL2.

Evaluation

Reported on the held-out test set (n=71):

Metric Value
Accuracy ~1.00
F1 (macro) ~1.00
Precision ~1.00
Recall ~1.00

Honest caveat: the test set is small (71 examples). The high F1 reflects strong in-distribution performance but does not guarantee the model is robust to:

  • News-style drift over time
  • Unseen metaphorical patterns
  • Articles mixing multiple disaster types

A larger, time-stratified evaluation is planned with the multi-label v2 model.

Limitations & Bias

  • Training corpus skews to high-impact urban floods (İstanbul, Ankara, İzmir overrepresented). Recall on rural/small-town flood reports may be lower.
  • Temporal bias: training data spans roughly 2015–2024. Vocabulary or framing changes in news media (e.g. neologisms, new outlet styles) may degrade performance.
  • Binary scope: the model has no notion of severity. A small-scale flooding ("bodrum su bastı") is rated the same as a major disaster ("yüzlerce ev yıkıldı, can kaybı").
  • Language scope: Turkish only.
  • The model can be fooled by carefully crafted satire, sarcasm, or fictional descriptions — it has no fact-checking capability.

Roadmap

  • v2 (in development): Multi-label classifier covering 7 disaster types — flood (sel), earthquake (deprem), fire (yangin), landslide (heyelan), avalanche (cig), storm (firtina), sandstorm (kum_firtinasi).
  • v3: Joint extraction model that outputs disaster type + location (province/district) + severity in a single forward pass.

Citation

If you use this model in academic work, please cite the base model and link this repository:

@misc{schweter2020berturk,
  author    = {Stefan Schweter},
  title     = {BERTurk - BERT models for Turkish},
  year      = {2020},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.3770924},
  url       = {https://doi.org/10.5281/zenodo.3770924}
}

@misc{sabunis2025floodbert,
  author    = {Hakan Sabunis},
  title     = {Turkish Flood News Classifier (BERTurk fine-tune)},
  year      = {2025},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/hakansabunis/turkish-flood-news-bert}
}

Author

Built as part of an undergraduate capstone project at İstanbul Medipol University — the broader FloodGuard disaster early-warning system.

License

MIT — see LICENSE. The base model (dbmdz/bert-base-turkish-cased) is licensed under MIT.


Türkçe

Türkçe Sel Haberi Sınıflandırıcı (BERTurk fine-tune)

Bir Türkçe haber metninin Türkiye'de gerçekleşmiş bir sel olayını raporlayıp raporlamadığını ikili (1 / 0) olarak sınıflandırır. dbmdz/bert-base-turkish-cased baz alınarak fine-tune edilmiştir.

⚠️ Bu Faz 1 modeldir — dar kapsamlı, ikili, mütevazı bir veri setiyle eğitilmiş. 7 afet tipi içeren çok-etiketli bir sürüm geliştirilmektedir.

Kullanım amacı

  • Türkçe haber pipeline'larında ön filtre — alakasız haberleri hızla eleyip kalanları daha yavaş bir LLM çıkarım katmanına yollamak için.
  • Türkçe afet NLP araştırmalarına baseline.

Kapsam dışı

  • Yurt dışı haberleri (model çoğunlukla Türkiye-içi olaylarla eğitildi)
  • Sel dışındaki afet tipleri (deprem, yangın, fırtına vb.) — onlar için v2'yi bekleyin
  • Yapılandırılmış bilgi çıkarma (il, ilçe, can kaybı) — model sadece ikili etiket verir
  • Sosyal medya kısa metinleri (eğitim verisi haber metinleri)

Veri (716 örnek, dengeli)

Bölüm Toplam Negatif Pozitif
Eğitim 574 296 278
Doğrulama 71 38 33
Test 71 24 47

Negatif örnekler bilinçli olarak kafa karıştırıcı vakalardan derlendi: mecazi kullanımlar ("gözyaşları sel"), yurt dışı olayları, uyarılar/tahminler, geçmiş yıl anmaları.

Eğitim

4 epoch, batch=16, lr=2e-5, AdamW, warmup=0.1, weight decay=0.01, FP16, max_len=512. Best-F1 model seçimi + early stopping. RTX 3050 4GB VRAM (WSL2) üzerinde eğitildi.

Test sonuçları

n=71 — F1 ≈ 1.00. Dürüst not: Test seti küçük; in-distribution performansı iyi olsa da gerçek dünya dağılım kayması, mecazi yeni kalıplar veya çok-tipli haberler için sonuç bu kadar yüksek olmayacaktır.

Sınırlamalar

  • Eğitim korpusu büyük şehir sellerine (İstanbul, Ankara, İzmir) yatkın
  • 2015–2024 zaman dilimi — sonraki dönemler için doğruluk düşebilir
  • Şiddet kavramı yok (bodrum su basması ile felaket aynı)
  • Sadece Türkçe

Referans

Akademik çalışmada kullanılırsa lütfen yukarıdaki BibTeX'i kullanın.

Yazar

İstanbul Medipol Üniversitesi capstone projesi (FloodGuard erken uyarı sistemi) — Hakan Sabunis, hakansabunis@gmail.com

Downloads last month
13
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 hakansabunis/turkish-flood-news-bert

Finetuned
(208)
this model

Evaluation results