MagnusKolsjo commited on
Commit
a9e449d
·
verified ·
1 Parent(s): 2358736

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +88 -0
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - sv
5
+ tags:
6
+ - kraken
7
+ - htr
8
+ - ocr
9
+ - fraktur
10
+ - swedish
11
+ - historical
12
+ pipeline_tag: image-to-text
13
+ ---
14
+
15
+ # Swedish Fraktur — Kraken OCR/HTR model
16
+
17
+ A [Kraken](https://kraken.re) recognition model (`.mlmodel`) for **OCR of older
18
+ Swedish text printed in Fraktur (blackletter)**. It produces a diplomatic
19
+ transcription that keeps historical orthography, the long s (ſ) and period
20
+ spelling, and works on scanned page images.
21
+
22
+ - **File:** `svensk_fraktur.mlmodel`
23
+ - **Type:** Kraken recognition model (baseline/HTR pipeline)
24
+ - **DOI:** [10.5281/zenodo.20702142](https://doi.org/10.5281/zenodo.20702142)
25
+ - **Best validation accuracy:** 0.9880 (≈ 1.2 % CER) on a held-out split
26
+ - **Base model:** `german_print` (fine-tuned from it)
27
+ - **Training data:** Språkbanken, *Svensk fraktur 1626–1816*
28
+
29
+ ## Usage
30
+
31
+ Fetch the model directly from Zenodo: `kraken get 10.5281/zenodo.20702142`
32
+
33
+ **Kraken (CLI):**
34
+
35
+ ```bash
36
+ kraken -i page.jpg out.txt segment -bl ocr -m svensk_fraktur.mlmodel
37
+ ```
38
+
39
+ For multi-page PDFs, render pages to images first (e.g. ~300 DPI) and pass them
40
+ to Kraken. **eScriptorium:** import the `.mlmodel` under *Models*.
41
+
42
+ ## How it was trained
43
+
44
+ Fine-tuned from `german_print` on the Språkbanken corpus *Svensk fraktur
45
+ 1626–1816* (199 page images with line-level diplomatic transcriptions). The page
46
+ images were OCR-bootstrapped and the recognized lines aligned to the ground-truth
47
+ line text (≈98 % coverage), producing PageXML for `ketos train`. A low learning
48
+ rate (`-r 0.0001`) was decisive — it let the model improve steadily past epoch 0
49
+ instead of drifting away from the strong starting point. See [`training/`](training/)
50
+ for the scripts and exact commands.
51
+
52
+ The validation accuracy is measured on a held-out split of the same corpus and is
53
+ therefore optimistic relative to entirely new documents; on a real volume
54
+ (1600s Swedish Fraktur) it produced a near-flawless body-text transcription with
55
+ preserved long-s and period spelling and no systematic substitution errors.
56
+
57
+ ## Limitations
58
+
59
+ - Trained on Swedish Fraktur print; not intended for handwriting or modern
60
+ (antiqua/roman) type.
61
+ - Ornate/decorated title-page initials are read less reliably than body text.
62
+ - Output is **diplomatic** (verbatim): historical spelling, long-s and printed
63
+ line-break hyphens are preserved. Modernisation/normalisation should happen in
64
+ a downstream step, not here.
65
+
66
+ ## Provenance, rights and attribution
67
+
68
+ This is a derivative model. Full chain:
69
+
70
+ | Layer | Resource | By | DOI | License |
71
+ |-------|----------|----|-----|---------|
72
+ | Base model | german_print (OCR model for German prints) | S. Weil, J. Kamlah, T. Schmidt (2023) | [10.5281/zenodo.10519596](https://doi.org/10.5281/zenodo.10519596) | **CC0-1.0** |
73
+ | Training data | Svensk fraktur 1626–1816 | Språkbanken Text, University of Gothenburg | [10.23695/5sme-7437](https://doi.org/10.23695/5sme-7437) | **CC-BY-4.0** |
74
+
75
+ The base model is **CC0** (no attribution legally required; cited as courtesy).
76
+ The training data is **CC-BY-4.0**, which requires **attribution**. When you use
77
+ or redistribute this model, please keep the following attribution:
78
+
79
+ > Trained on *Svensk fraktur 1626–1816*, Språkbanken Text, University of
80
+ > Gothenburg (digitisation: Gothenburg University Library; transcription:
81
+ > GREPECT), [doi.org/10.23695/5sme-7437](https://doi.org/10.23695/5sme-7437),
82
+ > licensed CC-BY-4.0.
83
+
84
+ This model is released under **CC-BY-4.0** (see [`LICENSE`](LICENSE)).
85
+
86
+ ## Citation
87
+
88
+ See [`CITATION.cff`](CITATION.cff).