shaypal5 commited on
Commit
f74bcfc
·
verified ·
1 Parent(s): c8bbdb4

htext-cc0 v1: unified htext cc0 text releases (see README)

Browse files
NOTICE.md ADDED
The diff for this file is too large to render. See raw diff
 
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - he
4
+ license: cc0-1.0
5
+ tags:
6
+ - ocr
7
+ - hebrew
8
+ - htext
9
+ configs:
10
+ - config_name: default
11
+ data_files:
12
+ - split: train
13
+ path: data/*.parquet
14
+ ---
15
+
16
+ # htext-cc0: all CC0 1.0 htext text releases in one dataset
17
+
18
+ 74,347,024 Hebrew (and some Aramaic) text lines for OCR training: every published htext release under
19
+ CC0 1.0, merged and de-duplicated. The per-source repositories stay as they are; this dataset is a convenience union.
20
+
21
+ ## Columns
22
+
23
+ | Column | Meaning |
24
+ | --- | --- |
25
+ | `text` | the line |
26
+ | `variant` | `plain` or `niqqud` (pointed); for the Knesset plenary, `ocr` (the scans' text layer) or `transcription` |
27
+ | `lang` | `he`, or `arc` for Aramaic-heavy works (Talmud tractates, Targum, Zohar) |
28
+ | `source`, `source_release` | the component release the row was taken from |
29
+ | `sources` | every component release that has this exact line |
30
+ | `licence` | the source's own licence or rights basis for the line |
31
+ | `work_id`, `edition` | the work (and edition, where known) in the source's own ids |
32
+
33
+ Variants: niqqud 2,787,245, ocr 10,521,382, plain 40,241,565, transcription 20,796,832.
34
+
35
+ ## Build
36
+
37
+ - Exact de-duplication on (`variant`, `text`) within this dataset. 90,431,834 input rows; 74,347,024 kept.
38
+ The first row in the component order below is kept; the others are listed in `sources`. The Knesset plenary OCR and
39
+ transcription lanes are separate variants, so a line in both is kept in both.
40
+ - Every component file was fetched from its pinned Hugging Face commit and checked against the SHA-256 on its htext
41
+ card. Recipe: `recipe/` (fetch, build, stage); `build_manifest.json` lists every input file and hash.
42
+
43
+ ## Components
44
+
45
+ | Release | Hugging Face | DOI | Rows kept here | CLEAN record (HeOCR, private) |
46
+ | --- | --- | --- | ---: | --- |
47
+ | `tanakh-v1.1` | [HeOCR/htext-tanakh@082a6bc4](https://huggingface.co/datasets/HeOCR/htext-tanakh/tree/082a6bc4640922cce77d640aaa4613b43a76e664) | 10.5281/zenodo.24398530 | 115,320 | #164 |
48
+ | `sefaria-v3.1-cc0` | [HeOCR/htext-sefaria@afcf93c2](https://huggingface.co/datasets/HeOCR/htext-sefaria/tree/afcf93c24cda1ccbc80f3fe8fa49599b0ea5708b) | 10.5281/zenodo.24583313 | 28,994,342 | #1873, #1893 |
49
+ | `sefaria-v2-cc0` | [HeOCR/htext-sefaria@a92766c9](https://huggingface.co/datasets/HeOCR/htext-sefaria/tree/a92766c9fb4955b1f9fcb3766430cd5522af7614) | 10.5281/zenodo.24521423 | 58,093 | #857 |
50
+ | `sefaria-v1` | [HeOCR/htext-sefaria@2572e399](https://huggingface.co/datasets/HeOCR/htext-sefaria/tree/2572e399c910cbfe6410830cc93360b192c14728) | 10.5281/zenodo.24516961 | 6,328 | #785 |
51
+ | `pby-v3.1` | [HeOCR/htext-pby@e9743322](https://huggingface.co/datasets/HeOCR/htext-pby/tree/e9743322cffe783f7bad4e65236256baf111b990) | 10.5281/zenodo.24398596 | 13,528,270 | #164 |
52
+ | `pby-v2.1` | [HeOCR/htext-pby@2768cf84](https://huggingface.co/datasets/HeOCR/htext-pby/tree/2768cf84240a4b9677924f42d6c21da68ebc1c43) | — | 0 | #164 |
53
+ | `pby-v1.1` | [HeOCR/htext-pby@6ec05e10](https://huggingface.co/datasets/HeOCR/htext-pby/tree/6ec05e10a8d3d2a49bf20680a7cc665c6d57170c) | — | 98,878 | #164 |
54
+ | `tsel-haolam-v1` | [HeOCR/htext-tsel-haolam@c95c9a34](https://huggingface.co/datasets/HeOCR/htext-tsel-haolam/tree/c95c9a349a1f9a9d1972489c1b1d25b23fc24dbb) | 10.5281/zenodo.24521432 | 2,383 | #857 |
55
+ | `gutenberg-v1` | [HeOCR/htext-gutenberg@1f7432ee](https://huggingface.co/datasets/HeOCR/htext-gutenberg/tree/1f7432ee0240c0a23b44347cb1612c454fe78eed) | 10.5281/zenodo.24581353 | 5,292 | #1873 |
56
+ | `knesset-laws-v2` | [HeOCR/htext-knesset-laws@07019274](https://huggingface.co/datasets/HeOCR/htext-knesset-laws/tree/0701927460813ee6935c0e5811a65b731c3b248d) | 10.5281/zenodo.24384730 | 219,904 | #150 |
57
+ | `knesset-plenary-v1` | [HeOCR/htext-knesset-plenary@daf44afc](https://huggingface.co/datasets/HeOCR/htext-knesset-plenary/tree/daf44afc2737942acd57f77ea3299a6bc1b5e2e1) | — | 31,318,214 | #213 |
58
+
59
+ ## Evaluation hygiene
60
+
61
+ No new CLEAN check was needed: every component is an already published release that passed HeOCR's independent
62
+ CLEAN check (records above), and this dataset as a whole passed a work-level screen against HeOCR's current
63
+ evaluation reservations (v14; record #1893). Lines that share text with material HeOCR uses for evaluation are tagged in private
64
+ sidecars of those checks, not dropped (contamination policy v2, amendment 1), and HeOCR evaluations report results
65
+ both with and without them. Works that an evaluation set holds out whole are not in any component.
66
+
67
+ ## Rights and credit
68
+
69
+ Released under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). See NOTICE.md for the credit of every source.
70
+
71
+ Built by HeOCR (https://github.com/HeOCR) with htext (https://github.com/HeOCR/htext).
SHA256SUMS ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 09566cca1c58e7ca539e71c7b83cc832781bdbc8a98808a070f36c28fe7f0c83 NOTICE.md
2
+ 4fe7e70283399e02e823912e6423bc9ed921bcc3777dab90ede85ca698f39bc1 README.md
3
+ 0731c74a384a7b8a0469790c04b996f613eb5f5624a46929daa96a668fbca592 build_manifest.json
4
+ 231c9b9c69f49cc9438d0776e6efa52a6f59694e4c25f096f9c9fdc205f97ff0 data/train-00000.parquet
5
+ c1dbaec49602fa2a0729c1d3c48be4b9d4053ba53d3b8ce7fba4a90961c31aea data/train-00001.parquet
6
+ 17c054e4693b2474a68015fa5edd387c6d696adc5aa9def7fd3d106b227b7536 data/train-00002.parquet
7
+ 0a3d59dba588798cfd596abf440fa8b60cd45f5de18c5a9f16e2cfd8bec9255e data/train-00003.parquet
8
+ 7bb45ee2a17ae5282668c3191bab607335e91dcb42abdc2a0f4351d90a84cc43 data/train-00004.parquet
9
+ b95d5fdfe89f8634666405b65dc8886fea67cc31a830d498ce9e9e1cbe0102dd data/train-00005.parquet
10
+ c25f70c67fb44af4f1bade852e7dcc7c6c25396018d312559411ad2bdf634d08 data/train-00006.parquet
11
+ 5cb356cc19e88150c36e1686e385eeedd091e5c3fa6309e84da6a7b8dd2f92d1 data/train-00007.parquet
12
+ 316aad6ac641857c8f23bd86270a2e4635f7d87a22d76dc548c502e3b0dbf02f data/train-00008.parquet
13
+ 3c3bf0a2ab4331fcb071ae9a383b3b84bc7f6fb16c796f61d5a0f50e57aa6adc data/train-00009.parquet
14
+ d42a02e627153a8c6f8d40ed881dcffbe15bb238c819fe9b3a84f99e74fa2a9d data/train-00010.parquet
15
+ 99cd45d90fc6c9e952b17297d4ba72b72fb126fa7de1ad18e381711a60ced3f7 data/train-00011.parquet
16
+ aff385758c2c23ee64a953ddf48f6d2d22224d87f8b247f6e00c28016c45fa8f data/train-00012.parquet
17
+ f95451bcfee93627b9e453f3fb8f273bf2e5feb8a4a84b7aaba41eeba48d3dde data/train-00013.parquet
18
+ 53815bef459cfdaf2943a46f27692aa5c180c86666eba96a8683c63fa2da68c2 data/train-00014.parquet
19
+ 1fa5aa4d94c750940318d71f286e98d03a303c5215b187dc5b83d6f376886d42 data/train-00015.parquet
20
+ 4e2593e2b24e88f424e85bd6b775357381e4a44708648a0c30ca19018eb65030 data/train-00016.parquet
21
+ 05e8f4df44fa07d87ec0fd8ae3fb7b3878e6754876a4b06b7decdceef176ec49 data/train-00017.parquet
22
+ 48acdfc358006097ef828ac99980ae698eb0d37b99a5dc5f84ba6bccac5e9c5c data/train-00018.parquet
23
+ c42f4969d228a406250e9c968678544df27f9a4ba29d136bdef840ff181740c2 data/train-00019.parquet
24
+ 01b4b2242f18a8c99b077e811c1550c86c0600da4166f840f3022cf7c4448fc2 data/train-00020.parquet
25
+ d95b51b8ee1c95f0a5943da58ba81a07a4e69797f543a0ca55a09ebaf04f0e0b data/train-00021.parquet
26
+ 0ddaa6232ac05d394c819a1a1bcf903e7c4adc147d3f1fa733cfeab5fa59f881 data/train-00022.parquet
27
+ 56c3f8f1b1793ab84d18a209a242449b4589dfd4daab90827791e69bc92ee7ed data/train-00023.parquet
28
+ 76a21b072282cd785fb851fb8a3b67c38a556ec04961837384c99e62e282b8d7 data/train-00024.parquet
29
+ 737b3a9488d1901003220307235da21b71f53fe59c0dac36a3014befdb4fd89c data/train-00025.parquet
30
+ c06c722e43a8aec7b05ed0067f978d4ae9f4ca4849d52eacd60a81f6e72d15c2 data/train-00026.parquet
31
+ e4b14a51fe4d5cb76a2893aaede8b997b892d4e38d756e8adc2a60a7841589ed data/train-00027.parquet
32
+ 0f22e661fee42c86a8466c919f44f1154546b40c756f6e0c9f708641a2622004 data/train-00028.parquet
33
+ ae8657d52ca8eb9863bf533e30247c0a1615113852e4a9361919648df84d6c50 data/train-00029.parquet
34
+ 3191772cbd23df15c4ee9462cd56aa447fc30ac4d46fdb4ba749780794cc7c24 data/train-00030.parquet
35
+ 0bde208b6dcb45fcc3cce303906039ec68e3b0e7e6c60cbebd07489e2311352e data/train-00031.parquet
36
+ 4589a0445eaec8d441c0bb9a8a9e2a43aa9dcc4f5d4234c9593692fe35a7e799 data/train-00032.parquet
37
+ 717e012f41267c92c28d2edae07c17a15943e271ec25a124e4df6ff974633d10 data/train-00033.parquet
38
+ 7f4ccb2019d20725bfbd149098772c435fce829d5d78ab6d6941b5eedea9ac34 data/train-00034.parquet
39
+ 3ff1eb7d972d1c596df6429e3383df33f518bfd4f45183c946e5ea0078fa3742 data/train-00035.parquet
40
+ 4df3fb857d0200d4a3f5f28f25ab53084f30caa25a0294d84d66db0ba5c435c6 data/train-00036.parquet
41
+ 27fd71ad6d693a779c98fe4925413ada0e0b04f1539a8e0a872f2b8175e5bd4b data/train-00037.parquet
42
+ 0b557b94559293c8e94bb3fe864388a0e52db6349461f6901578d4e48e24fa36 recipe/build.py
43
+ 144fe761f625a7e07bd790bdbf5edeb70fcb6cadccc27785ab1c4951f49231ae recipe/fetch.py
44
+ 71278448cda48b9c363a0909aa59743ea71bec3f8f6e59caf66a4c9bfbbd882a recipe/stage.py
build_manifest.json ADDED
@@ -0,0 +1,582 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tier": "cc0",
3
+ "licence": "CC0-1.0",
4
+ "order": [
5
+ "tanakh-v1.1",
6
+ "sefaria-v3.1-cc0",
7
+ "sefaria-v2-cc0",
8
+ "sefaria-v1",
9
+ "pby-v3.1",
10
+ "pby-v2.1",
11
+ "pby-v1.1",
12
+ "tsel-haolam-v1",
13
+ "gutenberg-v1",
14
+ "knesset-laws-v2",
15
+ "knesset-plenary-v1"
16
+ ],
17
+ "components": {
18
+ "tanakh-v1.1": {
19
+ "tier": "cc0",
20
+ "repo": "HeOCR/htext-tanakh",
21
+ "revision": "tanakh-v1.1",
22
+ "commit": "082a6bc4640922cce77d640aaa4613b43a76e664",
23
+ "files": {
24
+ "tanakh_lines_niqqud_v1.index.jsonl.gz": {
25
+ "path": "data/tanakh_lines_niqqud_v1.index.jsonl.gz",
26
+ "sha256": "9e08c27816845aa6dd4173a2bd33333e23bcfb8a6cab7ecbb7f5dfc22d8ecd7e",
27
+ "bytes": 2500148
28
+ },
29
+ "tanakh_lines_niqqud_v1.txt": {
30
+ "path": "data/tanakh_lines_niqqud_v1.txt",
31
+ "sha256": "c4da466e48fef1086dc18fe3d7baed439ff6fd22d09ddc0d7f655066a66a1c0f",
32
+ "bytes": 4589508
33
+ },
34
+ "tanakh_lines_plain_v1.index.jsonl.gz": {
35
+ "path": "data/tanakh_lines_plain_v1.index.jsonl.gz",
36
+ "sha256": "5f8ae45dfa8eb7816f550c6964eca6997a17693621241786d2439c9091580937",
37
+ "bytes": 2496874
38
+ },
39
+ "tanakh_lines_plain_v1.txt": {
40
+ "path": "data/tanakh_lines_plain_v1.txt",
41
+ "sha256": "0291d17d4594bc0a41b5304eb3655add4a2ebb03ab92f90fe9e4d773883d8c7b",
42
+ "bytes": 2656873
43
+ }
44
+ }
45
+ },
46
+ "sefaria-v3.1-cc0": {
47
+ "tier": "cc0",
48
+ "repo": "HeOCR/htext-sefaria",
49
+ "revision": "sefaria-v3.1-cc0",
50
+ "commit": "afcf93c24cda1ccbc80f3fe8fa49599b0ea5708b",
51
+ "files": {
52
+ "sefaria_cc0_lines_niqqud_arc_v3.txt": {
53
+ "path": "releases/sefaria-v3.1-cc0/sefaria_cc0_lines_niqqud_arc_v3.txt",
54
+ "sha256": "c8a42f4326fdbba02c6eff619b9bc85cb4bb0c5125fa90e5752b735d6fa27f3c",
55
+ "bytes": 3236651
56
+ },
57
+ "sefaria_cc0_lines_niqqud_he_v3.txt": {
58
+ "path": "releases/sefaria-v3.1-cc0/sefaria_cc0_lines_niqqud_he_v3.txt",
59
+ "sha256": "05263c3ab09b703fdd63e7787e989a3e75708f01c9d311cdac510dd858a7796d",
60
+ "bytes": 72989905
61
+ },
62
+ "sefaria_cc0_lines_plain_arc_v3.txt": {
63
+ "path": "releases/sefaria-v3.1-cc0/sefaria_cc0_lines_plain_arc_v3.txt",
64
+ "sha256": "f3f4e8788c65eea4be136aa68483d136a17efaea58ecdf2eb70a98210899135e",
65
+ "bytes": 1273057
66
+ },
67
+ "sefaria_cc0_lines_plain_he_v3.txt": {
68
+ "path": "releases/sefaria-v3.1-cc0/sefaria_cc0_lines_plain_he_v3.txt",
69
+ "sha256": "0fc14122293f549c285c6be0e44b55f88ce38ac51009e8ddb3a8a7e9ed89f98b",
70
+ "bytes": 1327890111
71
+ },
72
+ "sefaria_line_index.v3.tsv.gz": {
73
+ "path": "releases/sefaria-v3.1-cc0/sefaria_line_index.v3.tsv.gz",
74
+ "sha256": "0e5b35d80682d192a52a8b2bfafa7f3a1e4314b1ba68933c0ec40068b7416f80",
75
+ "bytes": 20336739
76
+ },
77
+ "sefaria_rights_index.v3.jsonl.gz": {
78
+ "path": "releases/sefaria-v3.1-cc0/sefaria_rights_index.v3.jsonl.gz",
79
+ "sha256": "7d02c41f3673f30485038c5bbc6c9210c7bf88a9a28fecd2de2a915f824fc477",
80
+ "bytes": 436385
81
+ }
82
+ }
83
+ },
84
+ "sefaria-v2-cc0": {
85
+ "tier": "cc0",
86
+ "repo": "HeOCR/htext-sefaria",
87
+ "revision": "a92766c9fb4955b1f9fcb3766430cd5522af7614",
88
+ "commit": "a92766c9fb4955b1f9fcb3766430cd5522af7614",
89
+ "files": {
90
+ "niqqud.index.jsonl": {
91
+ "path": "releases/sefaria-v2-cc0/niqqud.index.jsonl",
92
+ "sha256": "4ce835c64657cc208723e94dd8af4a1e7101f10a1b6c359d15a280c712213344",
93
+ "bytes": 17726441
94
+ },
95
+ "niqqud.txt": {
96
+ "path": "releases/sefaria-v2-cc0/niqqud.txt",
97
+ "sha256": "9f3b868948f97224ec3a291bc60b563285ac46c9c93a0082947ac3d4dd44fa4b",
98
+ "bytes": 3553783
99
+ },
100
+ "plain.index.jsonl": {
101
+ "path": "releases/sefaria-v2-cc0/plain.index.jsonl",
102
+ "sha256": "7f1d102bf37d9509b2686751d89de362fa991b04249eba9c5d82860d1e8b6e29",
103
+ "bytes": 6338682
104
+ },
105
+ "plain.txt": {
106
+ "path": "releases/sefaria-v2-cc0/plain.txt",
107
+ "sha256": "c5ab6dfa9a2bcb127b6efb1b5ef56f7b2daff1c036afd773765037212b97d610",
108
+ "bytes": 688336
109
+ }
110
+ }
111
+ },
112
+ "sefaria-v1": {
113
+ "tier": "cc0",
114
+ "repo": "HeOCR/htext-sefaria",
115
+ "revision": "2572e399c910cbfe6410830cc93360b192c14728",
116
+ "commit": "2572e399c910cbfe6410830cc93360b192c14728",
117
+ "files": {
118
+ "niqqud.index.jsonl": {
119
+ "path": "niqqud.index.jsonl",
120
+ "sha256": "f3f98389311087298abcd73c1055e8ccd545eba0f4f09a57384ea3208d084788",
121
+ "bytes": 322
122
+ },
123
+ "niqqud.txt": {
124
+ "path": "niqqud.txt",
125
+ "sha256": "da52f415ee46c6653fce2c2ee95d96cb44e0fa1aaf2572289358d2a2cb74b89f",
126
+ "bytes": 24
127
+ },
128
+ "plain.index.jsonl": {
129
+ "path": "plain.index.jsonl",
130
+ "sha256": "7e5a35e237b3651b8dddc80851abd46398427e1e71b6bf88b98c318ab0772f46",
131
+ "bytes": 2165961
132
+ },
133
+ "plain.txt": {
134
+ "path": "plain.txt",
135
+ "sha256": "a39ccb9e6363d79baf059fa7851f4732ed36b674415d68b45c9fa7fa4f2275c6",
136
+ "bytes": 291705
137
+ }
138
+ }
139
+ },
140
+ "pby-v3.1": {
141
+ "tier": "cc0",
142
+ "repo": "HeOCR/htext-pby",
143
+ "revision": "pby-v3.1",
144
+ "commit": "e9743322cffe783f7bad4e65236256baf111b990",
145
+ "files": {
146
+ "pby_lines_il_niqqud_v3.index.jsonl.gz": {
147
+ "path": "data/pby_lines_il_niqqud_v3.index.jsonl.gz",
148
+ "sha256": "bd16f777b5991fa2d48ea593fd45333ff746f20315e94e83438a1d82bce6a1a3",
149
+ "bytes": 67640518
150
+ },
151
+ "pby_lines_il_niqqud_v3.txt": {
152
+ "path": "data/pby_lines_il_niqqud_v3.txt",
153
+ "sha256": "4fe93147b96e1b089cb3bfe8900049e0a9cf0c03e9a853126bfbce25862ee8f2",
154
+ "bytes": 119281529
155
+ },
156
+ "pby_lines_il_plain_v3.index.jsonl.gz": {
157
+ "path": "data/pby_lines_il_plain_v3.index.jsonl.gz",
158
+ "sha256": "eabd0897547a0c04dd7efe6d25f918c1d40ca14415a063c25ffa5855d30b640c",
159
+ "bytes": 480667973
160
+ },
161
+ "pby_lines_il_plain_v3.txt": {
162
+ "path": "data/pby_lines_il_plain_v3.txt",
163
+ "sha256": "ff20f4502f27daae23266f8eb895ce1db0d1ba1acf6c2268203cd9c0e8256d5c",
164
+ "bytes": 543363626
165
+ }
166
+ }
167
+ },
168
+ "pby-v2.1": {
169
+ "tier": "cc0",
170
+ "repo": "HeOCR/htext-pby",
171
+ "revision": "pby-v2.1",
172
+ "commit": "2768cf84240a4b9677924f42d6c21da68ebc1c43",
173
+ "files": {
174
+ "pby_lines_il_niqqud_v2.index.jsonl.gz": {
175
+ "path": "data/pby_lines_il_niqqud_v2.index.jsonl.gz",
176
+ "sha256": "44ecb90dd704e9bd33ce232581edcc91c070dd051f1fb37c6a1d816c1fc084f7",
177
+ "bytes": 67639472
178
+ },
179
+ "pby_lines_il_niqqud_v2.txt": {
180
+ "path": "data/pby_lines_il_niqqud_v2.txt",
181
+ "sha256": "3065cc229f75fd09e3ff94806bf5f592391e07294f5e790cb2a7ca2dda26fe2a",
182
+ "bytes": 119280915
183
+ },
184
+ "pby_lines_il_plain_v2.index.jsonl.gz": {
185
+ "path": "data/pby_lines_il_plain_v2.index.jsonl.gz",
186
+ "sha256": "5f4a8865e0ff7fa219b86839d6e53189d34951041cbc220b0fab47de1f6b073b",
187
+ "bytes": 480661793
188
+ },
189
+ "pby_lines_il_plain_v2.txt": {
190
+ "path": "data/pby_lines_il_plain_v2.txt",
191
+ "sha256": "a822cc0b633254ec037844d82c7c17189a188cf278ed1f7eb8c8a89ad854c672",
192
+ "bytes": 543360350
193
+ },
194
+ "pby_lines_il_us_niqqud_v2.index.jsonl.gz": {
195
+ "path": "data/pby_lines_il_us_niqqud_v2.index.jsonl.gz",
196
+ "sha256": "561636a7a00f9c8dcadca16256f00e1424c448ddee3ba507641b0c3b0a78d329",
197
+ "bytes": 753981
198
+ },
199
+ "pby_lines_il_us_niqqud_v2.txt": {
200
+ "path": "data/pby_lines_il_us_niqqud_v2.txt",
201
+ "sha256": "1afa01272237f83b2533b5db1ec64b5763d85f6680b79fb7fb9313e772234bdd",
202
+ "bytes": 1322452
203
+ },
204
+ "pby_lines_il_us_plain_v2.index.jsonl.gz": {
205
+ "path": "data/pby_lines_il_us_plain_v2.index.jsonl.gz",
206
+ "sha256": "54b06ca13241b30e358829780bcb52230cb2f38e1337d1af56bff11533159115",
207
+ "bytes": 14939530
208
+ },
209
+ "pby_lines_il_us_plain_v2.txt": {
210
+ "path": "data/pby_lines_il_us_plain_v2.txt",
211
+ "sha256": "b0ee7cbf8451653b2c8f0d74d89187070f7561503451cf601d34a2af13f07d3d",
212
+ "bytes": 17243627
213
+ }
214
+ }
215
+ },
216
+ "pby-v1.1": {
217
+ "tier": "cc0",
218
+ "repo": "HeOCR/htext-pby",
219
+ "revision": "pby-v1.1",
220
+ "commit": "6ec05e10a8d3d2a49bf20680a7cc665c6d57170c",
221
+ "files": {
222
+ "pby_lines_il_niqqud_v1.index.jsonl.gz": {
223
+ "path": "data/pby_lines_il_niqqud_v1.index.jsonl.gz",
224
+ "sha256": "c2163ef5c1a65f1303c5157898e1db43a2c6d56f91ef91a79c96e8c423cf23b2",
225
+ "bytes": 16378748
226
+ },
227
+ "pby_lines_il_niqqud_v1.txt": {
228
+ "path": "data/pby_lines_il_niqqud_v1.txt",
229
+ "sha256": "ae553d87c6b6ba5587288eb66239706029a0e0d12434585e042b0fabe5f3a0af",
230
+ "bytes": 30725433
231
+ },
232
+ "pby_lines_il_plain_v1.index.jsonl.gz": {
233
+ "path": "data/pby_lines_il_plain_v1.index.jsonl.gz",
234
+ "sha256": "670dc959a5337b81079a3ce89a4f8598cccb3a56ac6af7cb60e9ab0284feb1cf",
235
+ "bytes": 65686249
236
+ },
237
+ "pby_lines_il_plain_v1.txt": {
238
+ "path": "data/pby_lines_il_plain_v1.txt",
239
+ "sha256": "9c10bdf9663fb671f5509d59686cbcf8e39862881ee23d38413b6db11f4441b6",
240
+ "bytes": 74004102
241
+ },
242
+ "pby_lines_il_us_niqqud_v1.index.jsonl.gz": {
243
+ "path": "data/pby_lines_il_us_niqqud_v1.index.jsonl.gz",
244
+ "sha256": "057522b3225531c11cd9ab65d3c048fd8dd76993dda51da3c34e8cd405a268af",
245
+ "bytes": 408490
246
+ },
247
+ "pby_lines_il_us_niqqud_v1.txt": {
248
+ "path": "data/pby_lines_il_us_niqqud_v1.txt",
249
+ "sha256": "9ed8232bc217384b1af76f3024c756bb27ef08f80147d7168bf89e127cb118ab",
250
+ "bytes": 735651
251
+ },
252
+ "pby_lines_il_us_plain_v1.index.jsonl.gz": {
253
+ "path": "data/pby_lines_il_us_plain_v1.index.jsonl.gz",
254
+ "sha256": "5b424186763828227dc8b15f73da6756e5634f4f15eca429b2efb3ece78a29e1",
255
+ "bytes": 2758126
256
+ },
257
+ "pby_lines_il_us_plain_v1.txt": {
258
+ "path": "data/pby_lines_il_us_plain_v1.txt",
259
+ "sha256": "8f31f41b4b94567f609a8277436816f0087dc40147d02b7f80b5687222c9e309",
260
+ "bytes": 3167355
261
+ }
262
+ }
263
+ },
264
+ "tsel-haolam-v1": {
265
+ "tier": "cc0",
266
+ "repo": "HeOCR/htext-tsel-haolam",
267
+ "revision": "c95c9a349a1f9a9d1972489c1b1d25b23fc24dbb",
268
+ "commit": "c95c9a349a1f9a9d1972489c1b1d25b23fc24dbb",
269
+ "files": {
270
+ "niqqud.index.jsonl": {
271
+ "path": "niqqud.index.jsonl",
272
+ "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
273
+ "bytes": 0
274
+ },
275
+ "niqqud.txt": {
276
+ "path": "niqqud.txt",
277
+ "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
278
+ "bytes": 0
279
+ },
280
+ "plain.index.jsonl": {
281
+ "path": "plain.index.jsonl",
282
+ "sha256": "e36215038389b3ec7ee8fb19253066a482c3d185b131f837f5203f9f387a6c65",
283
+ "bytes": 893021
284
+ },
285
+ "plain.txt": {
286
+ "path": "plain.txt",
287
+ "sha256": "2466941c5be91ec12813726f678daf0fe5eaf2a3378fdd6ea40405741f8fbdb6",
288
+ "bytes": 114908
289
+ }
290
+ }
291
+ },
292
+ "gutenberg-v1": {
293
+ "tier": "cc0",
294
+ "repo": "HeOCR/htext-gutenberg",
295
+ "revision": "1f7432ee0240c0a23b44347cb1612c454fe78eed",
296
+ "commit": "1f7432ee0240c0a23b44347cb1612c454fe78eed",
297
+ "files": {
298
+ "gutenberg_line_index.v1.jsonl.gz": {
299
+ "path": "gutenberg_line_index.v1.jsonl.gz",
300
+ "sha256": "ca28d8cb8e74dbdd72fbd7e65a2c978febc746775dc447e69d8ba2ee2caa1391",
301
+ "bytes": 212049
302
+ },
303
+ "gutenberg_lines_niqqud_v1.txt": {
304
+ "path": "gutenberg_lines_niqqud_v1.txt",
305
+ "sha256": "502fc295aedce7f5316739877cae8bef8fa4bd0cc4aaf59a70082d5d80660471",
306
+ "bytes": 82
307
+ },
308
+ "gutenberg_lines_plain_v1.txt": {
309
+ "path": "gutenberg_lines_plain_v1.txt",
310
+ "sha256": "7f91ae47cc68a943e3e21fd7c8f6915fae4b33ee6564188e7ff99291c3faf662",
311
+ "bytes": 256846
312
+ },
313
+ "gutenberg_rights_index.v1.jsonl.gz": {
314
+ "path": "gutenberg_rights_index.v1.jsonl.gz",
315
+ "sha256": "97ee2c15741e8f3c101019b6ea6bb11f3634cb4b25b9ef114d39121dfaf5946c",
316
+ "bytes": 750
317
+ }
318
+ }
319
+ },
320
+ "knesset-laws-v2": {
321
+ "tier": "cc0",
322
+ "repo": "HeOCR/htext-knesset-laws",
323
+ "revision": "knesset-laws-v2",
324
+ "commit": "0701927460813ee6935c0e5811a65b731c3b248d",
325
+ "files": {
326
+ "knesset_laws_line_index.v1.jsonl.gz": {
327
+ "path": "data/knesset_laws_line_index.v1.jsonl.gz",
328
+ "sha256": "103049ccc3c2a35f3abb3ae24a53fd8a4137d9be3db00ef10581b8adb5cafaca",
329
+ "bytes": 9106157
330
+ },
331
+ "knesset_laws_lines_plain_v2.txt": {
332
+ "path": "data/knesset_laws_lines_plain_v2.txt",
333
+ "sha256": "790099a2e64c2e391957a2c9f306c6a8c0addd087cfd8431666165f5b4f65de1",
334
+ "bytes": 9853052
335
+ }
336
+ }
337
+ },
338
+ "knesset-plenary-v1": {
339
+ "tier": "cc0",
340
+ "repo": "HeOCR/htext-knesset-plenary",
341
+ "revision": "knesset-plenary-v1",
342
+ "commit": "daf44afc2737942acd57f77ea3299a6bc1b5e2e1",
343
+ "files": {
344
+ "knesset_plenary_line_index.v1.jsonl.gz": {
345
+ "path": "data/knesset_plenary_line_index.v1.jsonl.gz",
346
+ "sha256": "5ac2095429e6955e6db7f525f6fbd9a0f6e31c68180fea6297ae713fd4614d4c",
347
+ "bytes": 1339875193
348
+ },
349
+ "knesset_plenary_lines_ocr_v1.txt": {
350
+ "path": "data/knesset_plenary_lines_ocr_v1.txt",
351
+ "sha256": "04671359681dd633d05fe5aae3aeb3b8e474719b2c23b33a7ece856e81bd33c9",
352
+ "bytes": 494392084
353
+ },
354
+ "knesset_plenary_lines_transcription_v1.txt": {
355
+ "path": "data/knesset_plenary_lines_transcription_v1.txt",
356
+ "sha256": "85d24964ef03a22db8c2971ddf07069bc12f30190fdca86296c20ce94fbebeda",
357
+ "bytes": 992225164
358
+ },
359
+ "knesset_plenary_rights_index.v1.jsonl.gz": {
360
+ "path": "data/knesset_plenary_rights_index.v1.jsonl.gz",
361
+ "sha256": "b0d84f60e0576cb747fad6a4ddca0ca027ecd95de651112099c20de4454cce43",
362
+ "bytes": 530803
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "stats": {
368
+ "rows_in": 90431834,
369
+ "rows_out": 74347024,
370
+ "by_source": {
371
+ "tanakh-v1.1": 115320,
372
+ "sefaria-v3.1-cc0": 28994342,
373
+ "sefaria-v2-cc0": 58093,
374
+ "sefaria-v1": 6328,
375
+ "pby-v3.1": 13528270,
376
+ "pby-v1.1": 98878,
377
+ "tsel-haolam-v1": 2383,
378
+ "gutenberg-v1": 5292,
379
+ "knesset-laws-v2": 219904,
380
+ "knesset-plenary-v1": 31318214
381
+ },
382
+ "by_variant": {
383
+ "niqqud": 2787245,
384
+ "plain": 40241565,
385
+ "ocr": 10521382,
386
+ "transcription": 20796832
387
+ }
388
+ },
389
+ "files": {
390
+ "data/train-00000.parquet": {
391
+ "rows": 2000000,
392
+ "sha256": "231c9b9c69f49cc9438d0776e6efa52a6f59694e4c25f096f9c9fdc205f97ff0",
393
+ "bytes": 39169144
394
+ },
395
+ "data/train-00001.parquet": {
396
+ "rows": 2000000,
397
+ "sha256": "c1dbaec49602fa2a0729c1d3c48be4b9d4053ba53d3b8ce7fba4a90961c31aea",
398
+ "bytes": 33186808
399
+ },
400
+ "data/train-00002.parquet": {
401
+ "rows": 2000000,
402
+ "sha256": "17c054e4693b2474a68015fa5edd387c6d696adc5aa9def7fd3d106b227b7536",
403
+ "bytes": 32542952
404
+ },
405
+ "data/train-00003.parquet": {
406
+ "rows": 2000000,
407
+ "sha256": "0a3d59dba588798cfd596abf440fa8b60cd45f5de18c5a9f16e2cfd8bec9255e",
408
+ "bytes": 31800036
409
+ },
410
+ "data/train-00004.parquet": {
411
+ "rows": 2000000,
412
+ "sha256": "7bb45ee2a17ae5282668c3191bab607335e91dcb42abdc2a0f4351d90a84cc43",
413
+ "bytes": 32099684
414
+ },
415
+ "data/train-00005.parquet": {
416
+ "rows": 2000000,
417
+ "sha256": "b95d5fdfe89f8634666405b65dc8886fea67cc31a830d498ce9e9e1cbe0102dd",
418
+ "bytes": 31373722
419
+ },
420
+ "data/train-00006.parquet": {
421
+ "rows": 2000000,
422
+ "sha256": "c25f70c67fb44af4f1bade852e7dcc7c6c25396018d312559411ad2bdf634d08",
423
+ "bytes": 31836252
424
+ },
425
+ "data/train-00007.parquet": {
426
+ "rows": 2000000,
427
+ "sha256": "5cb356cc19e88150c36e1686e385eeedd091e5c3fa6309e84da6a7b8dd2f92d1",
428
+ "bytes": 31546849
429
+ },
430
+ "data/train-00008.parquet": {
431
+ "rows": 2000000,
432
+ "sha256": "316aad6ac641857c8f23bd86270a2e4635f7d87a22d76dc548c502e3b0dbf02f",
433
+ "bytes": 32063009
434
+ },
435
+ "data/train-00009.parquet": {
436
+ "rows": 2000000,
437
+ "sha256": "3c3bf0a2ab4331fcb071ae9a383b3b84bc7f6fb16c796f61d5a0f50e57aa6adc",
438
+ "bytes": 32388720
439
+ },
440
+ "data/train-00010.parquet": {
441
+ "rows": 2000000,
442
+ "sha256": "d42a02e627153a8c6f8d40ed881dcffbe15bb238c819fe9b3a84f99e74fa2a9d",
443
+ "bytes": 32398534
444
+ },
445
+ "data/train-00011.parquet": {
446
+ "rows": 2000000,
447
+ "sha256": "99cd45d90fc6c9e952b17297d4ba72b72fb126fa7de1ad18e381711a60ced3f7",
448
+ "bytes": 32452532
449
+ },
450
+ "data/train-00012.parquet": {
451
+ "rows": 2000000,
452
+ "sha256": "aff385758c2c23ee64a953ddf48f6d2d22224d87f8b247f6e00c28016c45fa8f",
453
+ "bytes": 33160862
454
+ },
455
+ "data/train-00013.parquet": {
456
+ "rows": 2000000,
457
+ "sha256": "f95451bcfee93627b9e453f3fb8f273bf2e5feb8a4a84b7aaba41eeba48d3dde",
458
+ "bytes": 32984838
459
+ },
460
+ "data/train-00014.parquet": {
461
+ "rows": 2000000,
462
+ "sha256": "53815bef459cfdaf2943a46f27692aa5c180c86666eba96a8683c63fa2da68c2",
463
+ "bytes": 39368253
464
+ },
465
+ "data/train-00015.parquet": {
466
+ "rows": 2000000,
467
+ "sha256": "1fa5aa4d94c750940318d71f286e98d03a303c5215b187dc5b83d6f376886d42",
468
+ "bytes": 39944514
469
+ },
470
+ "data/train-00016.parquet": {
471
+ "rows": 2000000,
472
+ "sha256": "4e2593e2b24e88f424e85bd6b775357381e4a44708648a0c30ca19018eb65030",
473
+ "bytes": 35682450
474
+ },
475
+ "data/train-00017.parquet": {
476
+ "rows": 2000000,
477
+ "sha256": "05e8f4df44fa07d87ec0fd8ae3fb7b3878e6754876a4b06b7decdceef176ec49",
478
+ "bytes": 34435996
479
+ },
480
+ "data/train-00018.parquet": {
481
+ "rows": 2000000,
482
+ "sha256": "48acdfc358006097ef828ac99980ae698eb0d37b99a5dc5f84ba6bccac5e9c5c",
483
+ "bytes": 34249375
484
+ },
485
+ "data/train-00019.parquet": {
486
+ "rows": 2000000,
487
+ "sha256": "c42f4969d228a406250e9c968678544df27f9a4ba29d136bdef840ff181740c2",
488
+ "bytes": 34220135
489
+ },
490
+ "data/train-00020.parquet": {
491
+ "rows": 2000000,
492
+ "sha256": "01b4b2242f18a8c99b077e811c1550c86c0600da4166f840f3022cf7c4448fc2",
493
+ "bytes": 34169791
494
+ },
495
+ "data/train-00021.parquet": {
496
+ "rows": 2000000,
497
+ "sha256": "d95b51b8ee1c95f0a5943da58ba81a07a4e69797f543a0ca55a09ebaf04f0e0b",
498
+ "bytes": 33935427
499
+ },
500
+ "data/train-00022.parquet": {
501
+ "rows": 2000000,
502
+ "sha256": "0ddaa6232ac05d394c819a1a1bcf903e7c4adc147d3f1fa733cfeab5fa59f881",
503
+ "bytes": 33306173
504
+ },
505
+ "data/train-00023.parquet": {
506
+ "rows": 2000000,
507
+ "sha256": "56c3f8f1b1793ab84d18a209a242449b4589dfd4daab90827791e69bc92ee7ed",
508
+ "bytes": 33520354
509
+ },
510
+ "data/train-00024.parquet": {
511
+ "rows": 2000000,
512
+ "sha256": "76a21b072282cd785fb851fb8a3b67c38a556ec04961837384c99e62e282b8d7",
513
+ "bytes": 33673958
514
+ },
515
+ "data/train-00025.parquet": {
516
+ "rows": 2000000,
517
+ "sha256": "737b3a9488d1901003220307235da21b71f53fe59c0dac36a3014befdb4fd89c",
518
+ "bytes": 33723329
519
+ },
520
+ "data/train-00026.parquet": {
521
+ "rows": 2000000,
522
+ "sha256": "c06c722e43a8aec7b05ed0067f978d4ae9f4ca4849d52eacd60a81f6e72d15c2",
523
+ "bytes": 33598915
524
+ },
525
+ "data/train-00027.parquet": {
526
+ "rows": 2000000,
527
+ "sha256": "e4b14a51fe4d5cb76a2893aaede8b997b892d4e38d756e8adc2a60a7841589ed",
528
+ "bytes": 33305148
529
+ },
530
+ "data/train-00028.parquet": {
531
+ "rows": 2000000,
532
+ "sha256": "0f22e661fee42c86a8466c919f44f1154546b40c756f6e0c9f708641a2622004",
533
+ "bytes": 33415514
534
+ },
535
+ "data/train-00029.parquet": {
536
+ "rows": 2000000,
537
+ "sha256": "ae8657d52ca8eb9863bf533e30247c0a1615113852e4a9361919648df84d6c50",
538
+ "bytes": 33289866
539
+ },
540
+ "data/train-00030.parquet": {
541
+ "rows": 2000000,
542
+ "sha256": "3191772cbd23df15c4ee9462cd56aa447fc30ac4d46fdb4ba749780794cc7c24",
543
+ "bytes": 33526722
544
+ },
545
+ "data/train-00031.parquet": {
546
+ "rows": 2000000,
547
+ "sha256": "0bde208b6dcb45fcc3cce303906039ec68e3b0e7e6c60cbebd07489e2311352e",
548
+ "bytes": 33693612
549
+ },
550
+ "data/train-00032.parquet": {
551
+ "rows": 2000000,
552
+ "sha256": "4589a0445eaec8d441c0bb9a8a9e2a43aa9dcc4f5d4234c9593692fe35a7e799",
553
+ "bytes": 33618100
554
+ },
555
+ "data/train-00033.parquet": {
556
+ "rows": 2000000,
557
+ "sha256": "717e012f41267c92c28d2edae07c17a15943e271ec25a124e4df6ff974633d10",
558
+ "bytes": 33656024
559
+ },
560
+ "data/train-00034.parquet": {
561
+ "rows": 2000000,
562
+ "sha256": "7f4ccb2019d20725bfbd149098772c435fce829d5d78ab6d6941b5eedea9ac34",
563
+ "bytes": 33604504
564
+ },
565
+ "data/train-00035.parquet": {
566
+ "rows": 2000000,
567
+ "sha256": "3ff1eb7d972d1c596df6429e3383df33f518bfd4f45183c946e5ea0078fa3742",
568
+ "bytes": 33716204
569
+ },
570
+ "data/train-00036.parquet": {
571
+ "rows": 2000000,
572
+ "sha256": "4df3fb857d0200d4a3f5f28f25ab53084f30caa25a0294d84d66db0ba5c435c6",
573
+ "bytes": 33820069
574
+ },
575
+ "data/train-00037.parquet": {
576
+ "rows": 347024,
577
+ "sha256": "27fd71ad6d693a779c98fe4925413ada0e0b04f1539a8e0a872f2b8175e5bd4b",
578
+ "bytes": 5878335
579
+ }
580
+ },
581
+ "dedupe": "exact (variant, text); blake2b-64 + length; first row in component order kept, others listed in `sources`"
582
+ }
data/train-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:231c9b9c69f49cc9438d0776e6efa52a6f59694e4c25f096f9c9fdc205f97ff0
3
+ size 39169144
data/train-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1dbaec49602fa2a0729c1d3c48be4b9d4053ba53d3b8ce7fba4a90961c31aea
3
+ size 33186808
data/train-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17c054e4693b2474a68015fa5edd387c6d696adc5aa9def7fd3d106b227b7536
3
+ size 32542952
data/train-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a3d59dba588798cfd596abf440fa8b60cd45f5de18c5a9f16e2cfd8bec9255e
3
+ size 31800036
data/train-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bb45ee2a17ae5282668c3191bab607335e91dcb42abdc2a0f4351d90a84cc43
3
+ size 32099684
data/train-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b95d5fdfe89f8634666405b65dc8886fea67cc31a830d498ce9e9e1cbe0102dd
3
+ size 31373722
data/train-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c25f70c67fb44af4f1bade852e7dcc7c6c25396018d312559411ad2bdf634d08
3
+ size 31836252
data/train-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cb356cc19e88150c36e1686e385eeedd091e5c3fa6309e84da6a7b8dd2f92d1
3
+ size 31546849
data/train-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:316aad6ac641857c8f23bd86270a2e4635f7d87a22d76dc548c502e3b0dbf02f
3
+ size 32063009
data/train-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c3bf0a2ab4331fcb071ae9a383b3b84bc7f6fb16c796f61d5a0f50e57aa6adc
3
+ size 32388720
data/train-00010.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d42a02e627153a8c6f8d40ed881dcffbe15bb238c819fe9b3a84f99e74fa2a9d
3
+ size 32398534
data/train-00011.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99cd45d90fc6c9e952b17297d4ba72b72fb126fa7de1ad18e381711a60ced3f7
3
+ size 32452532
data/train-00012.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aff385758c2c23ee64a953ddf48f6d2d22224d87f8b247f6e00c28016c45fa8f
3
+ size 33160862
data/train-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f95451bcfee93627b9e453f3fb8f273bf2e5feb8a4a84b7aaba41eeba48d3dde
3
+ size 32984838
data/train-00014.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53815bef459cfdaf2943a46f27692aa5c180c86666eba96a8683c63fa2da68c2
3
+ size 39368253
data/train-00015.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fa5aa4d94c750940318d71f286e98d03a303c5215b187dc5b83d6f376886d42
3
+ size 39944514
data/train-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e2593e2b24e88f424e85bd6b775357381e4a44708648a0c30ca19018eb65030
3
+ size 35682450
data/train-00017.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05e8f4df44fa07d87ec0fd8ae3fb7b3878e6754876a4b06b7decdceef176ec49
3
+ size 34435996
data/train-00018.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48acdfc358006097ef828ac99980ae698eb0d37b99a5dc5f84ba6bccac5e9c5c
3
+ size 34249375
data/train-00019.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c42f4969d228a406250e9c968678544df27f9a4ba29d136bdef840ff181740c2
3
+ size 34220135
data/train-00020.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01b4b2242f18a8c99b077e811c1550c86c0600da4166f840f3022cf7c4448fc2
3
+ size 34169791
data/train-00021.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d95b51b8ee1c95f0a5943da58ba81a07a4e69797f543a0ca55a09ebaf04f0e0b
3
+ size 33935427
data/train-00022.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ddaa6232ac05d394c819a1a1bcf903e7c4adc147d3f1fa733cfeab5fa59f881
3
+ size 33306173
data/train-00023.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56c3f8f1b1793ab84d18a209a242449b4589dfd4daab90827791e69bc92ee7ed
3
+ size 33520354
data/train-00024.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76a21b072282cd785fb851fb8a3b67c38a556ec04961837384c99e62e282b8d7
3
+ size 33673958
data/train-00025.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:737b3a9488d1901003220307235da21b71f53fe59c0dac36a3014befdb4fd89c
3
+ size 33723329
data/train-00026.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c06c722e43a8aec7b05ed0067f978d4ae9f4ca4849d52eacd60a81f6e72d15c2
3
+ size 33598915
data/train-00027.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4b14a51fe4d5cb76a2893aaede8b997b892d4e38d756e8adc2a60a7841589ed
3
+ size 33305148
data/train-00028.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f22e661fee42c86a8466c919f44f1154546b40c756f6e0c9f708641a2622004
3
+ size 33415514
data/train-00029.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae8657d52ca8eb9863bf533e30247c0a1615113852e4a9361919648df84d6c50
3
+ size 33289866
data/train-00030.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3191772cbd23df15c4ee9462cd56aa447fc30ac4d46fdb4ba749780794cc7c24
3
+ size 33526722
data/train-00031.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bde208b6dcb45fcc3cce303906039ec68e3b0e7e6c60cbebd07489e2311352e
3
+ size 33693612
data/train-00032.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4589a0445eaec8d441c0bb9a8a9e2a43aa9dcc4f5d4234c9593692fe35a7e799
3
+ size 33618100
data/train-00033.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:717e012f41267c92c28d2edae07c17a15943e271ec25a124e4df6ff974633d10
3
+ size 33656024
data/train-00034.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f4ccb2019d20725bfbd149098772c435fce829d5d78ab6d6941b5eedea9ac34
3
+ size 33604504
data/train-00035.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ff1eb7d972d1c596df6429e3383df33f518bfd4f45183c946e5ea0078fa3742
3
+ size 33716204
data/train-00036.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4df3fb857d0200d4a3f5f28f25ab53084f30caa25a0294d84d66db0ba5c435c6
3
+ size 33820069
data/train-00037.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27fd71ad6d693a779c98fe4925413ada0e0b04f1539a8e0a872f2b8175e5bd4b
3
+ size 5878335
recipe/build.py ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Unified htext tiers (cc0 / by / by-sa): stream every component release (pinned, verified in components.json), exact
2
+ dedupe on (variant, text) within the tier keeping the first row in priority order with a `sources` list, write zstd
3
+ parquet shards. Two streaming passes; only 64-bit hashes, lengths and source ids are held in memory.
4
+ Usage: build.py SRC_DIR TIER OUT_DIR"""
5
+ import array, csv, gzip, hashlib, io, json, os, sys, time
6
+ import numpy as np, pyarrow as pa, pyarrow.parquet as pq
7
+ SRC, TIER, OUT = sys.argv[1], sys.argv[2], sys.argv[3]
8
+ COMP = json.load(open(os.path.join(SRC, "components.json")))
9
+ ORDER = {"cc0": ["tanakh-v1.1", "sefaria-v3.1-cc0", "sefaria-v2-cc0", "sefaria-v1", "pby-v3.1", "pby-v2.1", "pby-v1.1",
10
+ "tsel-haolam-v1", "gutenberg-v1", "knesset-laws-v2", "knesset-plenary-v1"],
11
+ "by": ["sefaria-v3-by", "sefaria-v2-by"],
12
+ "by-sa": ["wikisource-v4", "wikisource-v3", "wikisource-v2", "wikisource-v1", "sefaria-v3-by-sa"]}[TIER]
13
+ TIER_LIC = {"cc0": "CC0-1.0", "by": "CC-BY-4.0", "by-sa": "CC-BY-SA-4.0"}[TIER]
14
+ DEFAULT_LIC = {"pby": "Public Domain", "tanakh": "Public Domain", "knesset-laws": "Israel Copyright Act 2007 s.6 (not protected)",
15
+ "knesset-plenary": "Israel Copyright Act 2007 s.6 (not protected)", "tsel-haolam": "Public Domain", "gutenberg": "Public Domain",
16
+ "wikisource": "CC BY-SA 4.0"}
17
+ SOURCE = lambda name: name.rsplit("-v", 1)[0]
18
+ def rows_jsonl(path, keep=lambda r: True):
19
+ op = gzip.open if path.endswith(".gz") else open
20
+ with op(path, "rt", encoding="utf-8") as f:
21
+ for l in f:
22
+ r = json.loads(l)
23
+ if keep(r): yield r
24
+ def files_of(name):
25
+ d = os.path.join(SRC, name); fs = sorted(f for f in COMP[name]["files"] if f.endswith(".txt")); out = []
26
+ for f in fs:
27
+ p = os.path.join(d, f)
28
+ if os.path.getsize(p) == 0: continue
29
+ if name.startswith("sefaria-v3"):
30
+ parts = f.split("_lines_")[1].split("_"); subset, lang = parts[0], parts[1]
31
+ def it(subset=subset, lang=lang, d=d):
32
+ with gzip.open(os.path.join(d, "sefaria_line_index.v3.tsv.gz"), "rt", encoding="utf-8") as fh:
33
+ rd = csv.reader(fh, delimiter="\t", quoting=csv.QUOTE_NONE); next(rd)
34
+ for r in rd:
35
+ if r[0] == subset and r[1] == lang: yield {"work": r[2], "version": r[3]}
36
+ out.append((p, subset, lang, it, False))
37
+ elif name.startswith("knesset-plenary") or name.startswith("wikisource"):
38
+ idx = [x for x in COMP[name]["files"] if "line_index" in x][0]
39
+ variant = ("ocr" if "_ocr_" in f else "transcription") if "plenary" in name else ("niqqud" if "niqqud" in f else "plain")
40
+ out.append((p, variant, "he", (lambda f=f, idx=idx, d=d: rows_jsonl(os.path.join(d, idx), lambda r: r.get("file") == f)), True))
41
+ elif name.startswith("knesset-laws"):
42
+ out.append((p, "plain", "he", (lambda d=d: rows_jsonl(os.path.join(d, "knesset_laws_line_index.v1.jsonl.gz"))), True))
43
+ elif name.startswith("gutenberg"):
44
+ sub = "niqqud" if "niqqud" in f else "plain"
45
+ out.append((p, sub, "he", (lambda sub=sub, d=d: rows_jsonl(os.path.join(d, "gutenberg_line_index.v1.jsonl.gz"), lambda r: r.get("subset") == sub)), True))
46
+ else: # pby, tanakh: name.index.jsonl.gz; sefaria v1/v2, tsel: plain.index.jsonl
47
+ cand = [f.replace(".txt", ".index.jsonl.gz"), f.replace(".txt", ".index.jsonl")]
48
+ idx = [c for c in cand if c in COMP[name]["files"]][0]
49
+ out.append((p, "niqqud" if "niqqud" in f else "plain", "he", (lambda idx=idx, d=d: rows_jsonl(os.path.join(d, idx))), True))
50
+ return out
51
+ def meta(name, r):
52
+ s = SOURCE(name)
53
+ if s == "pby": return f"pby:{r['pby_work_id']}", None
54
+ if s == "tanakh": return f"tanakh:{r['ref']}", "Westminster Leningrad Codex (OSHB)"
55
+ if s == "knesset-laws": return f"law:{r['bill_id']}", r.get("booklet")
56
+ if s == "knesset-plenary": return f"plenary:{r['unit_id']}", None
57
+ if s == "gutenberg": return f"pg:{r['pg']}", None
58
+ if s == "tsel-haolam": return "pg:61024", None
59
+ if s == "wikisource": return f"wikisource:{r['unit_id']}", None
60
+ if s == "sefaria": return f"sefaria:{r.get('work')}", r.get("version") or r.get("version_title")
61
+ raise ValueError(name)
62
+ def stream():
63
+ for si, name in enumerate(ORDER):
64
+ for p, variant, lang, idx_it, has_sha in files_of(name):
65
+ n = 0
66
+ with open(p, encoding="utf-8") as fh:
67
+ it = idx_it()
68
+ for line in fh:
69
+ text = line.rstrip("\n"); r = next(it)
70
+ if has_sha and n % 997 == 0 and r.get("sha256") and hashlib.sha256(text.encode()).hexdigest() != r["sha256"]:
71
+ raise SystemExit(f"{p}:{n + 1}: index misaligned")
72
+ n += 1
73
+ yield si, name, variant, lang, text, r
74
+ if next(it, None) is not None: raise SystemExit(f"{p}: index has more rows than lines")
75
+ print(f" {name} {os.path.basename(p)} {n:,}", flush=True)
76
+ key = lambda v, t: int.from_bytes(hashlib.blake2b((v + "\x1f" + t).encode(), digest_size=8).digest(), "little", signed=True)
77
+ os.makedirs(OUT, exist_ok=True); t0 = time.time()
78
+ H, L, S = array.array("q"), array.array("i"), array.array("b")
79
+ print("pass 1", TIER, flush=True)
80
+ for si, name, variant, lang, text, r in stream():
81
+ H.append(key(variant, text)); L.append(len(text)); S.append(si)
82
+ H = np.frombuffer(H, dtype=np.int64); L = np.frombuffer(L, dtype=np.int32); S = np.frombuffer(S, dtype=np.int8); N = len(H)
83
+ o = np.lexsort((np.arange(N), L, H)); hs, ls = H[o], L[o]
84
+ start = np.ones(N, dtype=bool); start[1:] = (hs[1:] != hs[:-1]) | (ls[1:] != ls[:-1])
85
+ gid = np.cumsum(start) - 1; first = o[start]
86
+ mask = np.zeros(int(gid[-1]) + 1, dtype=np.int32); np.bitwise_or.at(mask, gid, (1 << S[o].astype(np.int32)))
87
+ keep = np.zeros(N, dtype=bool); keep[first] = True; rowmask = np.zeros(N, dtype=np.int32); rowmask[first] = mask
88
+ del H, L, hs, ls, o, start, gid
89
+ print(f"pass 1 done: {N:,} rows, {int(keep.sum()):,} kept, {time.time() - t0:.0f}s", flush=True)
90
+ schema = pa.schema([("text", pa.string()), ("variant", pa.string()), ("lang", pa.string()), ("source", pa.string()),
91
+ ("source_release", pa.string()), ("sources", pa.list_(pa.string())), ("licence", pa.string()),
92
+ ("work_id", pa.string()), ("edition", pa.string())])
93
+ SHARD = 2_000_000; buf = {k: [] for k in schema.names}; shard = 0; files = {}; stats = {"rows_in": int(N), "rows_out": 0, "by_source": {}, "by_variant": {}}
94
+ def flush():
95
+ global shard, buf
96
+ if not buf["text"]: return
97
+ name = f"data/train-{shard:05d}.parquet"; path = os.path.join(OUT, name); os.makedirs(os.path.dirname(path), exist_ok=True)
98
+ tmp = path + ".tmp"; pq.write_table(pa.table(buf, schema=schema), tmp, compression="zstd", row_group_size=200_000); os.replace(tmp, path)
99
+ h = hashlib.sha256(open(path, "rb").read()).hexdigest(); files[name] = {"rows": len(buf["text"]), "sha256": h, "bytes": os.path.getsize(path)}
100
+ print(f" wrote {name} {len(buf['text']):,}", flush=True); shard += 1; buf = {k: [] for k in schema.names}
101
+ print("pass 2", flush=True)
102
+ for i, (si, name, variant, lang, text, r) in enumerate(stream()):
103
+ if not keep[i]: continue
104
+ wid, ed = meta(name, r); m = int(rowmask[i])
105
+ lic = r.get("source_licence") or DEFAULT_LIC.get(SOURCE(name)) or ""
106
+ if name.startswith("sefaria-v3"): lic = lic or {"cc0": "Public Domain or CC0", "by": "CC-BY", "by-sa": "CC-BY-SA"}[TIER]
107
+ for k, v in (("text", text), ("variant", variant), ("lang", lang), ("source", SOURCE(name)), ("source_release", name),
108
+ ("sources", [ORDER[j] for j in range(len(ORDER)) if m >> j & 1]), ("licence", lic), ("work_id", wid), ("edition", ed)):
109
+ buf[k].append(v)
110
+ stats["by_source"][name] = stats["by_source"].get(name, 0) + 1; stats["by_variant"][variant] = stats["by_variant"].get(variant, 0) + 1
111
+ stats["rows_out"] += 1
112
+ if len(buf["text"]) >= SHARD: flush()
113
+ flush()
114
+ json.dump({"tier": TIER, "licence": TIER_LIC, "order": ORDER, "components": {n: COMP[n] for n in ORDER}, "stats": stats, "files": files,
115
+ "dedupe": "exact (variant, text); blake2b-64 + length; first row in component order kept, others listed in `sources`"},
116
+ open(os.path.join(OUT, "build_manifest.json"), "w"), ensure_ascii=False, indent=1)
117
+ print(json.dumps(stats), f"{time.time() - t0:.0f}s", flush=True)
recipe/fetch.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Fetch every component release of the unified htext tiers at its pinned HF revision (anonymous), recording sha256.
2
+ Usage: fetch.py OUT_DIR"""
3
+ import hashlib, json, os, sys
4
+ from huggingface_hub import HfApi, hf_hub_download
5
+ OUT = sys.argv[1]; api = HfApi()
6
+ C = [ # name, tier, repo, revision, path prefix
7
+ ("pby-v1.1", "cc0", "HeOCR/htext-pby", "pby-v1.1", "data/"), ("pby-v2.1", "cc0", "HeOCR/htext-pby", "pby-v2.1", "data/"),
8
+ ("pby-v3.1", "cc0", "HeOCR/htext-pby", "pby-v3.1", "data/"), ("tanakh-v1.1", "cc0", "HeOCR/htext-tanakh", "tanakh-v1.1", "data/"),
9
+ ("knesset-laws-v2", "cc0", "HeOCR/htext-knesset-laws", "knesset-laws-v2", "data/"),
10
+ ("knesset-plenary-v1", "cc0", "HeOCR/htext-knesset-plenary", "knesset-plenary-v1", "data/"),
11
+ ("sefaria-v1", "cc0", "HeOCR/htext-sefaria", "2572e399c910cbfe6410830cc93360b192c14728", ""),
12
+ ("sefaria-v2-cc0", "cc0", "HeOCR/htext-sefaria", "a92766c9fb4955b1f9fcb3766430cd5522af7614", "releases/sefaria-v2-cc0/"),
13
+ ("sefaria-v3-cc0", "cc0", "HeOCR/htext-sefaria", "8da7fb539e9ac8fc40c4f6e4f7073cb9a575bb38", "releases/sefaria-v3-cc0/"),
14
+ ("tsel-haolam-v1", "cc0", "HeOCR/htext-tsel-haolam", "c95c9a349a1f9a9d1972489c1b1d25b23fc24dbb", ""),
15
+ ("gutenberg-v1", "cc0", "HeOCR/htext-gutenberg", "1f7432ee0240c0a23b44347cb1612c454fe78eed", ""),
16
+ ("sefaria-v2-by", "by", "HeOCR/htext-sefaria-by", "e28fae17d635f72ad6c9a628734252c1ea219e24", ""),
17
+ ("sefaria-v3-by", "by", "HeOCR/htext-sefaria-by", "c55b5dcbc79b360b87031a1fa7aca029b62d25f0", "releases/sefaria-v3-by/"),
18
+ ("wikisource-v1", "by-sa", "HeOCR/htext-wikisource", "wikisource-v1", "data/"),
19
+ ("wikisource-v2", "by-sa", "HeOCR/htext-wikisource", "efcf3e55bedd7a17e6eef7db02afd4c5f6447144", "releases/wikisource-v2/"),
20
+ ("wikisource-v3", "by-sa", "HeOCR/htext-wikisource", "b7766502d9d297176925da620b01e357ad0f4ec6", "releases/wikisource-v3/"),
21
+ ("wikisource-v4", "by-sa", "HeOCR/htext-wikisource", "a5ee2ac15051447d571e027c87c9512317cce919", "releases/wikisource-v4/"),
22
+ ("sefaria-v3-by-sa", "by-sa", "HeOCR/htext-sefaria-by-sa", "1d24204f8bd53d3abc214619a2b73cd731552b5e", "")]
23
+ man = {}
24
+ for name, tier, repo, rev, pref in C:
25
+ commit = api.dataset_info(repo, revision=rev).sha
26
+ files = [f.path for f in api.list_repo_tree(repo, repo_type="dataset", revision=commit, recursive=True)
27
+ if hasattr(f, "size") and f.path.startswith(pref) and ("/" not in f.path[len(pref):]) and
28
+ f.path.endswith((".txt", ".jsonl", ".jsonl.gz", ".tsv.gz")) and "eye_check" not in f.path]
29
+ d = os.path.join(OUT, name); os.makedirs(d, exist_ok=True); rec = {}
30
+ for p in files:
31
+ dst = os.path.join(d, os.path.basename(p))
32
+ if not os.path.exists(dst):
33
+ got = hf_hub_download(repo, p, repo_type="dataset", revision=commit, token=False, local_dir=os.path.join(OUT, ".dl"))
34
+ os.replace(got, dst)
35
+ h = hashlib.sha256()
36
+ with open(dst, "rb") as f:
37
+ for b in iter(lambda: f.read(1 << 20), b""): h.update(b)
38
+ rec[os.path.basename(p)] = {"path": p, "sha256": h.hexdigest(), "bytes": os.path.getsize(dst)}
39
+ man[name] = {"tier": tier, "repo": repo, "revision": rev, "commit": commit, "files": rec}
40
+ print(name, commit[:10], len(rec), "files", flush=True)
41
+ json.dump(man, open(os.path.join(OUT, "components.json"), "w"), indent=1)
42
+ print("done")
recipe/stage.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Stage a unified tier package: data shards (hard links), README (HF config, components with HF commit + DOI,
2
+ per-source counts, CLEAN references, tag note), NOTICE (per-source credit; Sefaria per-edition credits), manifest,
3
+ recipe, SHA256SUMS, and the Zenodo ZIP. Usage: stage.py TIER OUT_DIR(build) STAGE_DIR REGISTRY_JSON CLEAN_REFS_JSON"""
4
+ import gzip, hashlib, json, os, shutil, sys, zipfile
5
+ TIER, BUILD, STAGE, REG, REFS = sys.argv[1:6]
6
+ m = json.load(open(f"{BUILD}/build_manifest.json")); reg = {f'{x["corpus"]}-{x["version"]}': x for x in json.load(open(REG))["corpora"]}
7
+ refs = json.load(open(REFS)); SRC = os.path.join(os.path.dirname(BUILD), "src")
8
+ LIC = {"cc0": ("CC0 1.0", "https://creativecommons.org/publicdomain/zero/1.0/", "cc0-1.0"),
9
+ "by": ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/", "cc-by-4.0"),
10
+ "by-sa": ("CC BY-SA 4.0", "https://creativecommons.org/licenses/by-sa/4.0/", "cc-by-sa-4.0")}[TIER]
11
+ d = os.path.join(STAGE, f"htext-{TIER}"); os.makedirs(f"{d}/data", exist_ok=True); os.makedirs(f"{d}/recipe", exist_ok=True)
12
+ for name in m["files"]:
13
+ t = os.path.join(d, name)
14
+ if not os.path.exists(t): os.link(os.path.join(BUILD, name), t)
15
+ shutil.copy(f"{BUILD}/build_manifest.json", f"{d}/build_manifest.json")
16
+ here = os.path.dirname(os.path.abspath(__file__))
17
+ for f in ("fetch.py", "build.py", "stage.py"): shutil.copy(os.path.join(here, f), f"{d}/recipe/{f}")
18
+ st = m["stats"]; comp = m["components"]
19
+ rows = []
20
+ for n in m["order"]:
21
+ r = reg[n]; z = (r.get("zenodo") or {}).get("doi")
22
+ hf = f'[{comp[n]["repo"]}@{comp[n]["commit"][:8]}](https://huggingface.co/datasets/{comp[n]["repo"]}/tree/{comp[n]["commit"]})'
23
+ rows.append(f'| `{n}` | {hf} | {z or "—"} | {st["by_source"].get(n, 0):,} | {refs.get(n, "")} |')
24
+ var = ", ".join(f"{k} {v:,}" for k, v in sorted(st["by_variant"].items()))
25
+ readme = f"""---
26
+ language:
27
+ - he
28
+ license: {LIC[2]}
29
+ tags:
30
+ - ocr
31
+ - hebrew
32
+ - htext
33
+ configs:
34
+ - config_name: default
35
+ data_files:
36
+ - split: train
37
+ path: data/*.parquet
38
+ ---
39
+
40
+ # htext-{TIER}: all {LIC[0]} htext text releases in one dataset
41
+
42
+ {st["rows_out"]:,} Hebrew (and some Aramaic) text lines for OCR training: every published htext release under
43
+ {LIC[0]}, merged and de-duplicated. The per-source repositories stay as they are; this dataset is a convenience union.
44
+
45
+ ## Columns
46
+
47
+ | Column | Meaning |
48
+ | --- | --- |
49
+ | `text` | the line |
50
+ | `variant` | `plain` or `niqqud` (pointed); for the Knesset plenary, `ocr` (the scans' text layer) or `transcription` |
51
+ | `lang` | `he`, or `arc` for Aramaic-heavy works (Talmud tractates, Targum, Zohar) |
52
+ | `source`, `source_release` | the component release the row was taken from |
53
+ | `sources` | every component release that has this exact line |
54
+ | `licence` | the source's own licence or rights basis for the line |
55
+ | `work_id`, `edition` | the work (and edition, where known) in the source's own ids |
56
+
57
+ Variants: {var}.
58
+
59
+ ## Build
60
+
61
+ - Exact de-duplication on (`variant`, `text`) within this dataset. {st["rows_in"]:,} input rows; {st["rows_out"]:,} kept.
62
+ The first row in the component order below is kept; the others are listed in `sources`. The Knesset plenary OCR and
63
+ transcription lanes are separate variants, so a line in both is kept in both.
64
+ - Every component file was fetched from its pinned Hugging Face commit and checked against the SHA-256 on its htext
65
+ card. Recipe: `recipe/` (fetch, build, stage); `build_manifest.json` lists every input file and hash.
66
+
67
+ ## Components
68
+
69
+ | Release | Hugging Face | DOI | Rows kept here | CLEAN record (HeOCR, private) |
70
+ | --- | --- | --- | ---: | --- |
71
+ {chr(10).join(rows)}
72
+
73
+ ## Evaluation hygiene
74
+
75
+ No new CLEAN check was needed: every component is an already published release that passed HeOCR's independent
76
+ CLEAN check (records above), and this dataset as a whole passed a work-level screen against HeOCR's current
77
+ evaluation reservations (v14; record #1893). Lines that share text with material HeOCR uses for evaluation are tagged in private
78
+ sidecars of those checks, not dropped (contamination policy v2, amendment 1), and HeOCR evaluations report results
79
+ both with and without them. Works that an evaluation set holds out whole are not in any component.
80
+
81
+ ## Rights and credit
82
+
83
+ Released under [{LIC[0]}]({LIC[1]}). See NOTICE.md for the credit of every source.
84
+
85
+ Built by HeOCR (https://github.com/HeOCR) with htext (https://github.com/HeOCR/htext).
86
+ """
87
+ open(f"{d}/README.md", "w", encoding="utf-8").write(readme)
88
+ N = [f"# Attribution\n\nhtext-{TIER} merges these htext releases; credit each source as below.\n"]
89
+ for n in m["order"]:
90
+ c = reg[n]["credit"]; N.append(f"- **{n}**: {c['text']} ({c.get('url', '')})")
91
+ seen = set(); ed = []
92
+ for n in m["order"]:
93
+ if not n.startswith("sefaria-v3"): continue
94
+ for l in gzip.open(os.path.join(SRC, n, "sefaria_rights_index.v3.jsonl.gz"), "rt", encoding="utf-8"):
95
+ r = json.loads(l); k = (r.get("title"), (r.get("credit") or {}).get("text"))
96
+ if k not in seen: seen.add(k); ed.append(f"- {k[0]}: {k[1]} ({r.get('source_licence')})")
97
+ if ed: N += ["", "## Sefaria editions (from the rights indexes)", ""] + ed
98
+ if TIER == "by-sa": N += ["", "Wikisource text: Hebrew Wikisource contributors, CC BY-SA 4.0. The per-page revision and contributor history is in each Wikisource component's rights index (linked above)."]
99
+ open(f"{d}/NOTICE.md", "w", encoding="utf-8").write("\n".join(N) + "\n")
100
+ def sha(p):
101
+ h = hashlib.sha256()
102
+ with open(p, "rb") as f:
103
+ for b in iter(lambda: f.read(1 << 20), b""): h.update(b)
104
+ return h.hexdigest()
105
+ allf = sorted(os.path.relpath(os.path.join(r, f), d) for r, _, fs in os.walk(d) for f in fs if f != "SHA256SUMS")
106
+ open(f"{d}/SHA256SUMS", "w").write("".join(f"{sha(os.path.join(d, f))} {f}\n" for f in allf))
107
+ z = os.path.join(STAGE, f"htext-{TIER}.zip")
108
+ with zipfile.ZipFile(z, "w", zipfile.ZIP_STORED) as zf: # parquet is already zstd-compressed
109
+ for f in sorted(allf + ["SHA256SUMS"]):
110
+ zi = zipfile.ZipInfo(f"htext-{TIER}/{f}", date_time=(2026, 11, 27, 0, 0, 0)); zi.external_attr = 0o644 << 16
111
+ with open(os.path.join(d, f), "rb") as fi, zf.open(zi, "w", force_zip64=True) as fo:
112
+ for b in iter(lambda: fi.read(1 << 20), b""): fo.write(b)
113
+ print(TIER, len(allf) + 1, "files;", os.path.getsize(z), "zip bytes")