Downloads · 30 days
9
43% of all-time downloads
nihad-ask/Arabert-EOU-detection-model
Arabert-EOU-detection-model is a machine learning model from nihad-ask. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model fine-tunes AraBERT for detecting end-of-turn (EOU) boundaries in Arabic dialogue. It predicts whether a given user message represents a continuation or an end of turn.
Downloads · 30 days
9
43% of all-time downloads
All-time downloads
21
Public
Parameters
135M
541 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors541 MB · 100%
From the Hugging Face model README
This model fine-tunes AraBERT for detecting end-of-turn (EOU) boundaries in Arabic dialogue.
It predicts whether a given user message represents a continuation or an end of turn.
nihad-ask/Arabert-EOU-detection-modelaubmindlab/bert-base-arabertv2This is a binary classification task:
| Label | Meaning |
|---|---|
| 0 | Speaker will continue (NOT end of turn) |
| 1 | End of turn (EOU detected) |
Accuracy: 0.9539
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 – Continue | 0.9494 | 0.9589 | 0.9541 | 1702 |
| 1 – End of Turn | 0.9585 | 0.9489 | 0.9536 | 1702 |
Overall:
| Metric | Score |
|---|---|
| Accuracy | 0.9539 |
| Macro Avg F1 | 0.9539 |
| Weighted Avg F1 | 0.9539 |
| Total Samples | 3404 |
Accuracy: 0.8919
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 – Continue | 0.7671 | 0.9445 | 0.8466 | 3097 |
| 1 – End of Turn | 0.9713 | 0.8676 | 0.9165 | 6705 |
Overall:
| Metric | Score |
|---|---|
| Accuracy | 0.8919 |
| Macro Avg F1 | 0.8815 |
| Weighted Avg F1 | 0.8944 |
| Total Samples | 9802 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "nihad-ask/Arabert-EOU-detection-model"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "تمام و بعدين؟"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1).item()
if prediction == 1:
print("End of turn")
else:
print("Speaker will continue")