freococo commited on
Commit
0c10310
·
verified ·
1 Parent(s): a518321

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -8
README.md CHANGED
@@ -127,7 +127,7 @@ This repository is a structurally aligned Arabic Optical Character Recognition (
127
 
128
  ## 📚 Master Book Inventory
129
 
130
- Total running pages in repository: **33,724**
131
 
132
  | # | Book Name (English) | Book Name (Arabic) | Subset / Config Name | Page Count | Image Index Range |
133
  |---| :--- | :--- | :--- | :---: | :---: |
@@ -135,7 +135,8 @@ Total running pages in repository: **33,724**
135
  | 2 | Sunan Ibn Majah | سنن ابن ماجه | `sunan_ibn_majah` | 3,012 | `3538.jpg` – `6549.jpg` |
136
  | 3 | Al-Musannaf by Ibn Abi Shaibah | المصنف لابن أبي شيبة | `musannaf_ibn_abi_shaibah` | 10,475 | `6550.jpg` – `17024.jpg` |
137
  | 4 | Tafsir al-Tabari (Jami' al-Bayan) | جامع البيان عن تأويل آي القرآن (تفسير الطبري) | `tafsir_al_tabari` | 16,700 | `17025.jpg` – `33724.jpg` |
138
- | **Total** | | | | **33,724** | |
 
139
 
140
  *(To add more books in the future, simply append a new row above and increment the running total).*
141
 
@@ -147,10 +148,10 @@ Every book subset inside this repository uses a standardized, clean schema:
147
 
148
  | Field Name | Type | Description |
149
  | :--- | :--- | :--- |
150
- | `file_name` | `string` | Relative path to the image on disk (present in `tafsir_al_tabari`). |
151
  | `image` | `Image` | Scanned page image (JPEG format, 150 DPI) |
152
  | `page_header` | `string` | Spatially aligned running headers containing page numbers and titles (or `null` if the book lacks running headers or has had headers cropped out to avoid layout mismatches). |
153
- | `body` | `string` | Clean Arabic main body text (fully stripped of HTML tags, normalized to Unix newlines, and free of database anchors). |
154
  | `footnotes` | `string` | Clean footnotes and/or bottom-centered Arabic page numbers matching the printed layout (`null` if none exist). |
155
 
156
  ---
@@ -174,9 +175,13 @@ dataset_musannaf = load_dataset("freococo/ocr_arabic_books", "musannaf_ibn_abi_s
174
  # 4. Load Tafsir al-Tabari subset
175
  dataset_tabari = load_dataset("freococo/ocr_arabic_books", "tafsir_al_tabari", split="train")
176
 
 
 
 
177
  # Access and preview
178
- first_page = dataset_tabari[0]
179
- print(first_page["body"]) # Displays the cleaned main body text
180
- print(first_page["footnotes"]) # Displays the footnotes (or None if empty)
181
- first_page["image"].show() # Automatically opens the cropped page JPEG
 
182
  ```
 
127
 
128
  ## 📚 Master Book Inventory
129
 
130
+ Total running pages in repository: **40,001**
131
 
132
  | # | Book Name (English) | Book Name (Arabic) | Subset / Config Name | Page Count | Image Index Range |
133
  |---| :--- | :--- | :--- | :---: | :---: |
 
135
  | 2 | Sunan Ibn Majah | سنن ابن ماجه | `sunan_ibn_majah` | 3,012 | `3538.jpg` – `6549.jpg` |
136
  | 3 | Al-Musannaf by Ibn Abi Shaibah | المصنف لابن أبي شيبة | `musannaf_ibn_abi_shaibah` | 10,475 | `6550.jpg` – `17024.jpg` |
137
  | 4 | Tafsir al-Tabari (Jami' al-Bayan) | جامع البيان عن تأويل آي القرآن (تفسير الطبري) | `tafsir_al_tabari` | 16,700 | `17025.jpg` – `33724.jpg` |
138
+ | 5 | Al-Mabsut by al-Sarakhsi | المبسوط للسرخسي | `al_mabsut` | 6,277 | `33725.jpg` – `40001.jpg` |
139
+ | **Total** | | | | **40,001** | |
140
 
141
  *(To add more books in the future, simply append a new row above and increment the running total).*
142
 
 
148
 
149
  | Field Name | Type | Description |
150
  | :--- | :--- | :--- |
151
+ | `file_name` | `string` | Relative path to the image on disk (present in `tafsir_al_tabari` and `al_mabsut`). |
152
  | `image` | `Image` | Scanned page image (JPEG format, 150 DPI) |
153
  | `page_header` | `string` | Spatially aligned running headers containing page numbers and titles (or `null` if the book lacks running headers or has had headers cropped out to avoid layout mismatches). |
154
+ | `body` | `string` | Clean Arabic main body text (fully stripped of HTML tags, normalized to Unix newlines, stripped of tashkeel/diacritics where appropriate to match printed page layouts, and free of database anchors). |
155
  | `footnotes` | `string` | Clean footnotes and/or bottom-centered Arabic page numbers matching the printed layout (`null` if none exist). |
156
 
157
  ---
 
175
  # 4. Load Tafsir al-Tabari subset
176
  dataset_tabari = load_dataset("freococo/ocr_arabic_books", "tafsir_al_tabari", split="train")
177
 
178
+ # 5. Load Al-Mabsut by al-Sarakhsi subset
179
+ dataset_mabsut = load_dataset("freococo/ocr_arabic_books", "al_mabsut", split="train")
180
+
181
  # Access and preview
182
+ first_page = dataset_mabsut[0]
183
+ print(first_page["body"]) # Displays the cleaned main body text (stripped of tashkeel)
184
+ print(first_page["page_header"]) # Displays the page header "(٢)"
185
+ print(first_page["footnotes"]) # Displays None (null)
186
+ first_page["image"].show() # Automatically opens the full-page uncropped visual image
187
  ```