Spaces:
Sleeping
Sleeping
Replace template README with model-linked card
Browse files
README.md
CHANGED
|
@@ -4,14 +4,46 @@ emoji: ๐ฌ
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.31.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
short_description: Split a raw hadith into sanad and matn
|
| 12 |
+
models:
|
| 13 |
+
- SHK4K/hadith-segmentation-bert
|
| 14 |
+
language:
|
| 15 |
+
- ar
|
| 16 |
+
tags:
|
| 17 |
+
- hadith
|
| 18 |
+
- sanad
|
| 19 |
+
- matn
|
| 20 |
+
- arabic
|
| 21 |
+
- token-classification
|
| 22 |
+
- digital-humanities
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# ูุงุตู ุงูุญุฏูุซ โ Hadith Splitter
|
| 26 |
+
|
| 27 |
+
ููุณู
ูุต ุญุฏูุซ ุฎุงู
(ุจุฏูู ุนูุงู
ุงุช ุชุฑููู
ูููููุฉ) ุฅูู **ุณูุฏ** (ุณูุณูุฉ ุงูุฑูุงุฉ) ู**ู
ุชู**
|
| 28 |
+
(ููู ุงููุจู ุตูู ุงููู ุนููู ูุณูู
)ุ ููุนุฑุถ ุงูุญุฏูุฏ ุจูููู
ุง ุจุงูุฃููุงู ุนูู ุงููุต ุงูุฃุตูู.
|
| 29 |
+
|
| 30 |
+
Splits a raw hadith string into its **sanad** (chain of narrators) and **matn**
|
| 31 |
+
(the saying itself), and highlights the boundary on the original text.
|
| 32 |
+
|
| 33 |
+
- Model: [SHK4K/hadith-segmentation-bert](https://huggingface.co/SHK4K/hadith-segmentation-bert)
|
| 34 |
+
(AraBERT v02 fine-tuned for token classification)
|
| 35 |
+
- Labels: `B-SANAD`, `I-SANAD`, `B-MATN`, `I-MATN`, reduced to a single cut
|
| 36 |
+
- Diacritics are stripped for inference (the model was trained undiacritized)
|
| 37 |
+
and mapped back, so the output keeps your original vocalized text
|
| 38 |
+
- Long hadiths: processed in overlapping 512-token windows (stride 128) with
|
| 39 |
+
per-word majority voting, so nothing is truncated
|
| 40 |
+
- Output strings are sliced from your original text, so punctuation and spacing
|
| 41 |
+
are preserved
|
| 42 |
+
|
| 43 |
+
## Limits
|
| 44 |
+
|
| 45 |
+
- Accuracy is limited on unusual orthography; the model was trained on
|
| 46 |
+
normalized Arabic, and the app normalizes before inference.
|
| 47 |
+
- Pastes longer than ~25k subword tokens are processed only up to that point.
|
| 48 |
+
- The model is small (0.1B); treat the boundary as a suggestion on
|
| 49 |
+
low-resource texts, not ground truth.
|