--- pretty_name: Arabic Wikisource Public-Domain Works language: - ar license: cc-by-sa-4.0 task_categories: - text-generation - fill-mask size_categories: - 10K **Jurisdiction note for `works-life50`.** The works in `works-life50` are in the public domain in countries where copyright lasts 50 years after the author's death (for example Saudi Arabia, Egypt and the United Arab Emirates), but not where it lasts 70 years after death (for example the member states of the European Union). Check the law of your own jurisdiction before using them. Page-level transcriptions with their proofreading status and page-image pairs are in the [Bayanat Labs Arabic Document Atlas](https://huggingface.co/datasets/Bayanat-Labs/arabic-document-atlas) (configs `community_text` and `reference_pairs`); this dataset links to the same pages and does not repeat them. ## What is in this release | Config | Rows | Words | What a row is | |---|---|---|---| | `works-pd-core` (default) | 40,782 | 66,352,748 | one work: text, chapters, verse lines, footnotes, people and dates, source pages | | `works-life50` | 663 | 3,414,760 | one work, same fields; see the jurisdiction note | | `authors` | 896 | no text | one person identified by a Wikidata id or an Author page, with dates and work counts per tier | | `pd_decisions` | 44,638 | no text | one work of the dump, released or not, with the tier, rule, reason and people | `exports/works-pd-core.jsonl.gz` has the same works as `works-pd-core`, one work per line (title, people, death years, genre, chapters), for use without the `datasets` library. Words are runs of letters and digits after normalisation with `bayanat-norm-v1` ([arabic-normalize](https://github.com/Bayanat-Labs/arabic-normalize) 0.1.0). ## How the tiers are decided For each work the people named as author, translator or editor are collected from Wikidata, from the page headers on Wikisource, from the Index page of the scan, and from the title and first lines of the text (`(ترجمة X)` at the end of the title, `المترجم: X`, `ترجمة: X`). Wikidata authors (P50) come from the work's item and the work it is an edition of. Translators (P655) come only from an item for an Arabic edition or translation (its language, P407, is a form of Arabic), never from the item of the original work, which lists the translators into other languages; editors (P98) come only from an item whose language is a form of Arabic. A name is matched to an Author page or a Wikidata person; when it fits several people, the one who died last decides. When the authors the page names and the authors of the Wikidata item are different people, the item describes another work and is not used (6 works); an item for an Arabic edition is kept. A work counts as a translation when a category or Wikidata says so, when the language of its Wikidata item is not a form of Arabic, or when the author's recorded languages include none. Each person's death date is read from Wikidata P570 with its precision and calendar (a Julian date known to the day is converted to the Gregorian calendar). When Wikidata has no death date, the year on the person's Author page is used; when neither has one, an upper bound of the birth year plus 125 years, or the floruit plus 100 years, is used only if it is 1955 or earlier. The tier follows from the latest death: | Tier | Rule | Condition | Works | |---|---|---|---| | `works-pd-core` | `all-died-by-1955` | every person named as author, translator or editor died in or before 1955 | 41,106 | | `works-pd-core` | `anonymous-pre-1900` | no person is named and the Arabic text is dated before 1900 (the edition year on the page header or the Index page) | 0 | | `works-pd-core` | `religious-primary-text` | classical religious primary text without modern commentary | 15 | | `works-life50` | `latest-death-1956-1975` | the latest death among the people named is in 1956-1975 | 708 | | `excluded` | `death-after-1975` | someone named died after 1975 | 86 | | `unverified` | `no-death-date` | someone named (translators and editors included) has no usable death date | 884 | | `unverified` | `imprecise-death-date` | a death date is known only to a decade or century that crosses a tier boundary | 0 | | `unverified` | `anonymous-not-pre-1900` | no author is named (for the work or some of its parts) and the Arabic text has no date before 1900 | 1,600 | | `unverified` | `translation-no-translator` | the work is a translation (by category, by Wikidata, because the language of its Wikidata item is not a form of Arabic, or because the author's recorded languages include none) and no translator is named | 238 | | `unverified` | `wikisource-contributor` | a Wikisource account is named as author or translator | 1 | The core cut-off (1955) matches copyright that lasts 70 years after the author's death; `works-life50` matches 50 years after death. These tiers come from dates recorded in Wikidata and on Wikisource; they are not legal advice. ## Fields `works-pd-core` and `works-life50`: | Field | Type | Description | |---|---|---| | `id` | string | `arwikisource-` of the work's root page | | `title`, `url`, `history_url` | string | title of the root page, its link, and the link to its history (the list of contributors) | | `wikidata_qid` | string | Wikidata item of the root page; empty when the item's authors are not the people the page names | | `tier`, `pd_rule`, `pd_reason` | string | tier, the rule that set it and a one-line reason | | `latest_death_year` | int | latest death year among the people named | | `author`, `author_qid`, `author_death_year` | string, string, int | the author who died last | | `death_century_ce`, `death_century_ah`, `century_ah_ce` | int, int, string | that author's century of death, Gregorian and Hijri | | `persons` | list | every person named: role (author, translator, editor), name, Wikidata id, Author page, death year, the range of possible years, precision, calendar, where the date comes from, and where the person is named | | `publication_year`, `first_publication_year` | int | year of the edition (header or Index page) and first publication of the work (Wikidata P577, not used for the tier) | | `genre`, `genre_source`, `genre_labels` | string, string, list | genre from Wikidata P136 or P31, else from Wikisource categories, else from the share of verse lines; Wikidata genre labels | | `language_labels`, `categories`, `is_translation` | list, list, bool | Wikidata languages of the work, Wikisource categories, translation flag | | `text_raw` | string | the whole text as transcribed (diacritics kept); chapters joined by a blank line; a line of verse is its two halves separated by a tab | | `text_norm` | string | `text_raw` normalised with `bayanat-norm-v1` | | `diacritization_ratio`, `words`, `chars` | float, int, int | share of Arabic letters carrying diacritics; words after normalisation; characters of `text_raw` | | `poetry_lines` | list of string | the lines of verse of the running text, halves separated by a tab | | `chapters` | list of {order, title, text, source_pages} | chapters in reading order; `source_pages` are the page titles each chapter was built from | | `footnotes` | list of {chapter, n, offset, text} | footnotes, with the character position of their mark in the chapter text | | `proofreading` | struct | scan pages transcluded and missing, scan pages per quality level (0 without text, 1 not proofread, 2 problematic, 3 proofread, 4 validated), the Index pages used | | `source_pages` | list | every page used (main namespace 0 and Page namespace 104): title, page id, revision id, revision time, URL, quality level | | `near_dup_group`, `near_dup_size` | string, int | near-duplicate group among released works and its size | | `source_license`, `source_license_url`, `dump_date` | string | `CC BY-SA 4.0`, its URL, `20261001` | `pd_decisions` has `id`, `title`, `url`, `wikidata_qid`, `tier`, `released`, `released_in`, `pd_rule`, `pd_reason`, `latest_death_year`, `persons`, the publication years, `is_translation`, `genre`, `n_chapters`, `words_raw` (words of the converted text before normalisation), `has_text` (false when the converted text has no letters, or only the work's title, a heading, a list of editions or a placeholder), `scan_pages_transcluded` and `dump_date`. A person without a Wikidata id or an Author page appears without a name. `authors` has `person_id`, `wikidata_qid`, `author_page`, `author_page_url`, names in Arabic and English, birth and death years, precision, calendar, evidence, centuries of death, roles and work counts per tier. No contributor account names are included anywhere. ## Load it ```python from datasets import load_dataset core = load_dataset("Bayanat-Labs/arabic-wikisource-pd", "works-pd-core", split="train") work = core[0] print(work["title"], work["author"], work["author_death_year"]) for ch in work["chapters"][:3]: print(ch["order"], ch["title"], ch["text"][:200]) decisions = load_dataset("Bayanat-Labs/arabic-wikisource-pd", "pd_decisions", split="train") ``` ## How it was built 1. **Dump.** `pages-articles`, `page_props`, `categorylinks` and `linktarget` of the 1 October 2026 run, downloaded from dumps.wikimedia.org with their SHA-1 checked (`PROVENANCE.jsonl`). 2. **Works.** A work is a main-namespace root page and all its subpages. Disambiguation pages are left out (42). Chapters follow the links of the pages themselves, depth first from the root page, then the other subpages in natural title order; a page that is mostly links to other pages of the work is a table of contents and not a chapter. 3. **Scans.** `` and `{{صفحات}}` are expanded from the Page-namespace bodies in the dump (page ranges, include and exclude lists, sections). Running heads and footers of the scan pages are not part of the text. The quality level of each scan page is recorded. 4. **Text.** Wikitext is converted with mwparserfromhell and a table of Arabic Wikisource templates: layout wrappers keep their text; verse templates (`أبيات`, `قصيدة1`, `بيت`, `شطر`, ``) become lines of verse; honorific templates become their words (ﷺ, رضي الله عنه, ...); `` and footnote templates become footnotes; headers, navigation and maintenance templates are dropped; interlanguage links and HTML tags left after conversion are removed. A template not in the table is dropped and counted (17,797 uses in this dump, mostly navigation boxes named after works). A modern editor's introduction headed `مقدمة التحقيق`, `مقدمة المحقق` or `من مقدمة المحقق` is left out of the work. Lines that are not part of a work are replaced by rules in the builder's `config/redactions.json`: a personal name that had been added to a heading, the IP-address signatures of anonymous edits, and placeholder text left by the editing toolbar. 5. **People and tiers.** As described above, with Wikidata read through its API (50 items per request, one request per second, `maxlag=5`). 6. **Normalisation and duplicates.** `bayanat-norm-v1` gives `text_norm` and the word counts. Near-duplicate groups among the released works use word 5-grams, MinHash with 128 permutations (32 bands of 4 rows) and an estimated Jaccard similarity of 0.8 or more: 1,259 released works are in 626 groups. The builder is open source: [https://github.com/Bayanat-Labs/arabic-wikisource-pd](https://github.com/Bayanat-Labs/arabic-wikisource-pd) (Apache-2.0), installable with `pip install "git+https://github.com/Bayanat-Labs/arabic-wikisource-pd@v0.1.0"`. ## Proofreading coverage 23 released works are built at least in part from transcluded scan pages. Their scan pages by quality level: 360 validated, 16,166 proofread, 1 problematic, 1,387 not proofread and 7 without text. The other released works were typed or pasted into main-namespace pages, so Wikisource records no proofreading level for them. For page-level text and images, see the [Arabic Document Atlas](https://huggingface.co/datasets/Bayanat-Labs/arabic-document-atlas). ## Quality checks These checks were run by Bayanat Labs; no person reviewed the texts or the decisions. **Public-domain decisions, a separate check.** A seeded sample of 100 decisions, drawn per tier (40 works-pd-core, 20 works-life50, 20 excluded, 20 unverified), was decided again in two ways with the same rules. First, each person's Wikidata item was read again from the live API (57 items): the tier came out the same for 100 of 100 (100.0%). Second, the Author page on Arabic Wikisource was read for every sampled person who has one (43 pages, 40 of them with a death year written on the page), and those years were used in place of Wikidata: the tier came out the same for 100 of 100 (100.0%). Where both give a year, the two are within one year of each other for 37 of 40 people. The rows are in `qa/pd_audit.json`. | Tier | Sampled | Same tier, Wikidata read again | Same tier, Author-page years | |---|---|---|---| | `works-pd-core` | 40 | 40 | 40 | | `works-life50` | 20 | 20 | 20 | | `excluded` | 20 | 20 | 20 | | `unverified` | 20 | 20 | 20 | **Text against the live pages.** For 20 released works drawn with a fixed seed (10 poems and 10 other works, since most released works are single poems), one chapter page was rendered by ar.wikisource.org and compared with the released chapter on normalised words (header, navigation, footnotes and edit links removed from the rendered page). Median recall (share of rendered words found in the release) 1.000, median precision 1.000; recall of 0.95 or more on 95.0% of the pages and precision of 0.95 or more on 100.0%. Pages may have been edited after the dump, and text that the live page draws from Lua modules or templates is not in the dump's wikitext. The per-page results are in `qa/text_spotcheck.json`. ## Statistics ![Words in released works by century of death](stats/words_by_death_century.png) ![Words in released works by genre](stats/words_by_genre.png) | Genre | Released works | Words | |---|---|---| | unclassified | 465 | 28,926,171 | | Quran exegesis (tafsir) | 13 | 7,084,631 | | history | 17 | 7,072,257 | | poetry | 40,732 | 6,086,825 | | hadith | 28 | 4,887,391 | | jurisprudence (fiqh) | 16 | 4,712,979 | | language and lexicography | 27 | 4,318,819 | | periodicals | 3 | 1,938,891 | Tables: `stats/by_tier.csv`, `stats/by_rule.csv`, `stats/by_century.csv`, `stats/by_genre.csv`; all numbers in this card are in `stats/stats.json` and `qa/`. ## Limitations - **Edition uncertainty.** Many main-namespace texts were copied from modern printed editions whose editors are not named on the page or in Wikidata. The tier rests on the people who are named; an unnamed modern editor's notes or corrections may be present in the text. - **Editors' introductions.** Modern editors' introductions are removed where they are headed as such (`مقدمة التحقيق`, `مقدمة المحقق`, `من مقدمة المحقق`): 2 in 2 released works. An introduction under another heading stays in the text. - **Translations.** A translation counts as one only when a category, Wikidata (including the language of the work's item) or the author's recorded languages show it, and its translator only when Wikidata (on an item for the Arabic version), the page header, the Index page, the title or the first lines of the text name one. A modern translation of an old work with none of these signals is decided by the original author's dates. - **Genre skew.** The released text is weighted toward classical religious and scholarly works (exegesis, hadith, jurisprudence) and classical poetry; modern prose is a small part, and genres come from rules, not from reading the texts. - **Incomplete transcriptions.** Works that Wikisource marks as incomplete (category أعمال غير مكتملة) are included as they are: 36 released works. Missing scan pages are counted in `proofreading`. - **Unclosed wikitext.** Where a page has a template or link that is never closed, the converter cannot tell where it ends and leaves the markup in the text: 29 released works contain `{{` or `[[`. HTML tags left after conversion are removed: no released work still contains one. - **Works without text.** 339 decisions in `works-pd-core` and 45 in `works-life50` have no text and are not released: 319 have no letters after conversion, and 65 were read and hold only the work's title, a heading, a list of editions or a placeholder, or a poem whose verse template the converter does not read. - **Whole works only.** A periodical or collection is decided as one work, so one late contributor keeps the whole of it out (for example a magazine with many authors). - **Text from modules.** Some pages draw their text from Lua modules (the Quran pages, for example) or from templates; that text is not in the dump's wikitext and is not included. - **Counts frozen at the dump date.** Wikisource and Wikidata keep changing; counts, texts and dates here are those of 1 October 2026 (Wikidata as read from 30 to 31 October 2026). - **Dates.** Death dates are only as good as Wikidata and the Author pages; the separate check above re-reads the same kinds of source. ## Licence and attribution - `works-pd-core`, `works-life50` and the JSONL export: **CC BY-SA 4.0**, from Arabic Wikisource. Credit "Arabic Wikisource contributors" and link the pages: each record has `url`, `history_url` (the list of contributors) and `source_pages` with revision ids. The underlying works are in the public domain as described above; the licence covers the Wikisource transcription. Full text: `LICENSE-CC-BY-SA-4.0`. - `authors`, `pd_decisions`, `stats/`, `qa/` and the fields Bayanat Labs computed: **CC BY 4.0**, Bayanat Labs. Full text: `LICENSE-CC-BY-4.0`. - Wikidata content: CC0 1.0. Sources: `LICENSE-sources.md`. Builder code: Apache-2.0. Wikisource and Wikidata are trademarks of the Wikimedia Foundation; this dataset is not affiliated with or endorsed by it. ## Citation ```bibtex @misc{bayanatlabs_arabic_wikisource_pd_2026, author = {Bayanat Labs}, title = {Arabic Wikisource Public-Domain Works}, year = {2026}, version = {0.1.0}, note = {Built from the Arabic Wikisource dump of 1 October 2026; text by Arabic Wikisource contributors, CC BY-SA 4.0}, url = {https://huggingface.co/datasets/Bayanat-Labs/arabic-wikisource-pd} } ``` ## Contact Questions, corrections and removal requests: hello@bayanatlabs.com (please give the work `id` and its URL). Corrections to a text itself are best made on Arabic Wikisource, where they will reach the next build. ## بالعربية أعمال من ويكي مصدر العربية في الملك العام، يُجمع كل عمل منها من صفحاته، أعيد بناؤها من ملف التفريغ الرسمي لويكيميديا (1 أكتوبر 2026): كتب ومجموعات وقصائد، لكل عمل فصوله ونصه وأبياته وحواشيه، ومعه المؤلف والمترجم والمحقق وتواريخ وفاتهم من ويكي بيانات، وفئة الملك العام المستخلصة منها. يضم `works-pd-core` 40,782 عملًا (66,352,748 كلمة) توفي كل من ذُكر فيها سنة 1955 أو قبلها، ويضم `works-life50` 663 عملًا توفي آخر من ذُكر فيها بين 1956 و1975. تنبيه: أعمال `works-life50` في الملك العام في البلدان التي تنتهي فيها الحماية بعد خمسين سنة من وفاة المؤلف (مثل السعودية ومصر والإمارات)، وليست كذلك حيث تمتد الحماية سبعين سنة. تحقق من قانون بلدك قبل استخدامها. النصوص بترخيص CC BY-SA 4.0 مع نسبتها إلى "مساهمي ويكي مصدر العربية"، والجداول بترخيص CC BY 4.0. للنصوص على مستوى الصفحة مع حالة التدقيق انظر [أطلس الوثائق العربية](https://huggingface.co/datasets/Bayanat-Labs/arabic-document-atlas). The Arabic text has not yet been reviewed by a native Arabic writer; the English governs.