File size: 4,515 Bytes
074601f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613c211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
074601f
613c211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
dataset_info:
  features:
  - name: image
    dtype: image
  - name: unique_id
    dtype: string
  - name: text
    dtype: string
  - name: text_line_id
    dtype: string
  - name: raw_text
    dtype: string
  - name: text_transform
    dtype: string
  - name: font_path
    dtype: string
  - name: font_size
    dtype: int64
  - name: text_color
    dtype: string
  - name: background_color
    dtype: string
  - name: top_margin
    dtype: int64
  - name: bottom_margin
    dtype: int64
  - name: left_margin
    dtype: int64
  - name: right_margin
    dtype: int64
  - name: bbox_left
    dtype: int64
  - name: bbox_top
    dtype: int64
  - name: bbox_right
    dtype: int64
  - name: bbox_bottom
    dtype: int64
  - name: image_width
    dtype: int64
  - name: image_height
    dtype: int64
  - name: undistorted_file_name
    dtype: string
  - name: augraphy_log_path
    dtype: string
  - name: distorted_bbox_left
    dtype: float64
  - name: distorted_bbox_top
    dtype: float64
  - name: distorted_bbox_right
    dtype: float64
  - name: distorted_bbox_bottom
    dtype: float64
  - name: language_code
    dtype: string
  splits:
  - name: train
    num_bytes: 10298088981.391
    num_examples: 307387
  - name: validation
    num_bytes: 1353982194.08
    num_examples: 40765
  - name: test
    num_bytes: 2455873836.834
    num_examples: 84534
  download_size: 13836005253
  dataset_size: 14107945012.305
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
license: cc-by-3.0
task_categories:
- image-to-text
tags:
- OCR
- ATR
- Sámi
- synthetic
pretty_name: Synthetic OCR data for North, South, Lule and Inari Sámi
size_categories:
- 100K<n<1M
language:
- sma
- sme
- smj
- smn
- smi
- se
---

# Synthetic text images for North, South, Lule and Inari Sámi
This dataset contains synthetic line images meant for fitting OCR models for North, South, Lule and Inari Sámi.
Clean line images are created using Pillow and they are subsequently distorted using Augraphy [[1]].

## Text sources
The text in this dataset comes from [Giellatekno]'s corpus. Specifically, we used the data files of the `converted/`-directories of [[2]][[3]][[4]][[5]] (commit hashes `32f4af263cefae6ab9182638e2451ff151757adc`, `00dac0e9e74b4a89214ad7d34de27b83362b3f3a`, `4303edf80ae5eee2a036663c7b38756a0aa2a189`, `7e3437ce8c7dc7692ccbd2505412c03e9e617be6`).

## Splits
The dataset is split randomly by file so 71 % of the files (307387 lines) are in the training split, 9 % of the files (40765 lines) are in the validation split and 20 % of the files (84534 lines) are in the test split.
Each split has a unique set of typefaces and text/background colors.

## Language distribution
The language distribution for the different languages are

| Language Code |       Num train lines |       Num val lines |       Num test lines |
|---------------|-----------------------|---------------------|----------------------|
| sma           | 76971 | 10992 | 21981 |
| sme           | 76949 | 10992 | 21990 |
| smj           | 76970 | 9081 | 20465 |
| smn           | 76497 | 9700 | 20098 |

## Code
The code to create this dataset is available on our [GitHub Repo] (commit hash `90341bc19d6368c7848dcc2459065058486a89ea`).

## Referencing the dataset
If you use this dataset in your research, then please cite both
"Enstad T, Trosterud T, Røsok MI, Beyer Y, Roald M. Comparative analysis of optical character recognition methods for Sámi texts from the National Library of Norway. Accepted for publication in Proceedings of the 25th Nordic Conference on Computational Linguistics (NoDaLiDa) 2025."
(see the [paper repository]) and the SIKOR dataset the Sámi text is from:
"SIKOR UiT The Arctic University of Norway and the Norwegian Saami Parliament's Saami text collection, http://gtweb.uit.no/korp, Version 01.12.2021 [Data set]."
Also note that the SIKOR dataset to get Sámi text for the images is (CC-BY 3.0) licensed.

## Dataset license
The dataset is licensed with a CC-BY 3.0 license.

[1]: https://github.com/sparkfish/augraphy

[2]: https://github.com/giellalt/corpus-sma

[3]: https://github.com/giellalt/corpus-sme

[4]: https://github.com/giellalt/corpus-smj

[5]: https://github.com/giellalt/corpus-smn

[Giellatekno]: https://giellatekno.uit.no/

[GitHub Repo]: https://github.com/Sprakbanken/synthetic_text_images

[paper repository]: https://github.com/Sprakbanken/nodalida25_sami_ocr