SHK4K commited on
Commit
df07aee
ยท
verified ยท
1 Parent(s): 0c10b0c

Replace template README with model-linked card

Browse files
Files changed (1) hide show
  1. README.md +39 -7
README.md CHANGED
@@ -4,14 +4,46 @@ emoji: ๐Ÿ’ฌ
4
  colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 6.5.1
8
  app_file: app.py
9
  pinned: false
10
- hf_oauth: true
11
- hf_oauth_scopes:
12
- - inference-api
13
- license: apache-2.0
14
- short_description: A model to split hadith to sanad and matn
 
 
 
 
 
 
 
 
15
  ---
16
 
17
- An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.