mohameddiop5 thebogko commited on
Commit
a80527e
·
0 Parent(s):

Duplicate from thebogko/bulgarian-spelling-mistakes

Browse files

Co-authored-by: thebogko <thebogko@users.noreply.huggingface.co>

Files changed (3) hide show
  1. .gitattributes +56 -0
  2. README.md +178 -0
  3. spell_errors.csv +3 -0
.gitattributes ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
56
+ spell_errors.csv filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text2text-generation
5
+ language:
6
+ - bg
7
+ pretty_name: Bulgarian Spelling Mistakes
8
+ size_categories:
9
+ - 10K<n<100K
10
+ ---
11
+
12
+ # Dataset of Bulgarian Spelling Mistakes
13
+
14
+ ## Table of Contents
15
+ - [Dataset of Bulgarian Spelling Mistakes](#dataset-of-bulgarian-spelling-mistakes)
16
+ - [Table of Contents](#table-of-contents)
17
+ - [Dataset Description](#dataset-description)
18
+ - [Dataset Summary](#dataset-summary)
19
+ - [Supported Tasks](#supported-tasks)
20
+ - [Languages](#languages)
21
+ - [Dataset Structure](#dataset-structure)
22
+ - [Data Instances](#data-instances)
23
+ - [Data Fields](#data-fields)
24
+ - [Data Splits](#data-splits)
25
+ - [Dataset Creation](#dataset-creation)
26
+ - [Curation Rationale](#curation-rationale)
27
+ - [Source Data](#source-data)
28
+ - [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
29
+ - [Introducing Spelling Errors](#introducing-spelling-errors)
30
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
31
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
32
+ - [Social Impact of Dataset](#social-impact-of-dataset)
33
+ - [Discussion of Biases](#discussion-of-biases)
34
+ - [Other Known Limitations](#other-known-limitations)
35
+ - [Additional Information](#additional-information)
36
+ <!--
37
+ - [Dataset Curators](#dataset-curators)-->
38
+ - [Licensing Information](#licensing-information)
39
+ <!-- - [Citation Information](#citation-information)
40
+ - [Contributions](#contributions)-->
41
+
42
+ ## Dataset Description
43
+
44
+ - **Paper :** https://aclanthology.org/2024.icnlsp-1.38/
45
+ - **Point of Contact:** Bozhidar Klouchek; Please contact klouchek.bozhidar@gmail.com
46
+
47
+ ### Dataset Summary
48
+
49
+ This is a dataset of sentences in Bulgarian with spelling mistakes created by automatically inducing errors in correct sentences.
50
+
51
+ ### Supported Tasks
52
+
53
+ - `text2text-generation`: The dataset can be used to train a model for spelling error correction, which consists in correction of spelling errors. in a source sentence, resulting in a correct version.
54
+
55
+ ### Languages
56
+
57
+ - `bg`: Only Bulgarian is supported by this dataset.
58
+
59
+ ## Dataset Structure
60
+
61
+ ### Data Instances
62
+
63
+ Each instance contains an `error_type`, which can be one of four pre-defined classes. This error_type describes the error found in the sequence in `erroeneous` which has been corrected in the sequence under `correct`.
64
+
65
+ ```
66
+ {
67
+ 'error_type': 'article_misuse',
68
+ 'erroeneous': 'Възстанието влияе на всички ни!',
69
+ 'correct': 'Въстанието влияе на всички ни!'
70
+ }
71
+ ```
72
+
73
+ ### Data Fields
74
+
75
+ - `error_type`: a string sequence that can be one of:
76
+ - **vowel_change**
77
+ - **double_consonant**
78
+ - **end_of_lemma_consonant**
79
+ - **double_t_or_n**
80
+ - **loss_of_t_or_d_sound**
81
+ - **random_char**
82
+ - **semantic**
83
+ - `erroeneous`: a string sequence of the erroneous sentence containing up to three errors in the error-correct pair
84
+ - `correct`: a string sequence of the correct sentence in the error-correct pair
85
+
86
+ ### Data Splits
87
+
88
+ No pre-defined split has been applied to the dataset so the developer has the freedom to choose one that suits the task.
89
+
90
+ ## Dataset Creation
91
+
92
+ ### Curation Rationale
93
+
94
+ Main motivations for the creating of this dataset:
95
+ - resources for error correction NLP systems in Bulgarian are scarce, so this dataset aims to enocourage the development and evaluation of more such systems,
96
+ - solutions within Bulgarian NLP are traditional machine learning methods, so a dataset like this aims to encourage the development of state-of-the-art models (e.g. deep learning approaches)
97
+
98
+ ### Source Data
99
+
100
+ The source data for this dataset has been collected from Bulgarian Wikipedia articles.
101
+
102
+ ### Initial Data Collection and Normalization
103
+
104
+ The data collection process was such:
105
+ 1) Data collection: Articles from Bulgarian Wikipedia were collected using Wikipedia's API.
106
+ 2) The source texts underwent POS tagging and sentence segmentation using the tool from the work of [(Berbatova M., Ivanov F.,2023)](https://doi.org/10.60063/gsu.fmi.110.37-50).
107
+ 3) Only sentences that (1) have three or more words, and (2) contain a token tagged as a verb were kept, as many of the sentences were simply article titles, links and other textual data we weren't interested in.
108
+
109
+ ### Introducing Spelling Errors
110
+
111
+ The dataset has been created by introduced spelling errors in correct sentences.
112
+
113
+ Errors of the pre-defined types were induced using Python scripts, taking into account the error's nature, the algorithm is outlined as such:
114
+ - Take a source sentence, which would be kept as the reference.
115
+ - Induce an error of the pre-defined types, if that is possible (some sentences do not contain necessary pre-requisites for certain error types e.g. a relative pronoun is necessary to introduce an error of that type)
116
+ - Pair up the correct and erroneous versions
117
+
118
+ These errors have only been applied to lemmas:
119
+ - larger than three characters, because shorter words tend to be functional words, and
120
+ - not containg capitalised letters, on the assumption that it might be a named entity
121
+
122
+ The resulting erroneous sentences were created with four different types of changes, reflected in the error_type column. In the examples below the first sequence is the **CORRECT** form, and the resulting sequence is **ERRONEOUS**.
123
+ 1) **vowel_change**: a vowel that is not under stress is changed to its twin sounding vowel (e.g. 'кръг**ъ**л' -> 'кръг**а**л')
124
+ 2) **double_consonant**: when two neighbouring consonants with differing sound strengths change the first one to match the second ('постано**в**ка' -> 'постано**ф**ка')
125
+ 3) **end_of_lemma_consonant**: changing a strong sounding consonant to its weak sounding twin if at the end of a lemma ('маси**в**' -> 'маси**ф**')
126
+ 4) **double_t_or_n**: removing one of the 'н' or 'т' letters when two of the same kind are found neighbouring, often in suffixes ('пролет**т**а' -> пролета, един**н**о -> едино)
127
+ 5) **loss_of_t_or_d_sound**: removing either 'т' or 'д' if found in a lemma where the sound of the removed letter is lost ('вес**т**ник' -> 'весник', 'звез**д**на' -> звезна)
128
+ 6) **random_char**: replacing one random character in a lemma with another random character ('мо**м**иче' -> 'мо**г**иче')
129
+ 7) **semantic**: replacing, removing, adding a character or swapping two characters of a lemma such that the resulting word is a valid word syntactically, but the sentence is no longer semantically coherent ('Момчето, което обичам.' -> 'Момчето, ко**т**ето обичам.')
130
+
131
+ ### Personal and Sensitive Information
132
+
133
+ The source of this dataset is open-source data collections (Wikipedia) and carry the same amount of risk of personal and/or sensitive information as they do.
134
+
135
+ ## Considerations for Using the Data
136
+
137
+ ### Social Impact of Dataset
138
+
139
+ A dataset like this can be beneficial for language learners and developers in the error correction community.
140
+
141
+ ### Discussion of Biases
142
+
143
+ The `error_type` classes are not distributed equally, as some errors are more common than others. It's important the developer utlising this dataset is aware of this as to not create error correction system/evaluations that are biased.
144
+
145
+ ### Other Known Limitations
146
+
147
+ There are many spelling errors not covered by this dataset, as it's the first of its kind. Hopefully, it encourages people to create more datasets like this and models that utilise them.
148
+
149
+ ## Additional Information
150
+
151
+ <!--
152
+ ### Dataset Curators
153
+
154
+ List the people involved in collecting the dataset and their affiliation(s). If funding information is known, include it here. -->
155
+
156
+ ### Licensing Information
157
+
158
+ The license of the dataset is [apache2.0](https://www.apache.org/licenses/LICENSE-2.0).
159
+
160
+ <!--
161
+ ### Citation Information
162
+
163
+ Provide the [BibTex](http://www.bibtex.org/)-formatted reference for the dataset. For example:
164
+ ```
165
+ @article{article_id,
166
+ author = {Author List},
167
+ title = {Dataset Paper Title},
168
+ journal = {Publication Venue},
169
+ year = {2525}
170
+ }
171
+ ```
172
+
173
+ If the dataset has a [DOI](https://www.doi.org/), please provide it here.
174
+
175
+ ### Contributions
176
+
177
+ Thanks to [@github-username](https://github.com/<github-username>) for adding this dataset.
178
+ -->
spell_errors.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d6f9551e40f9567ee7522ed05dea8494018cdfb47260ef3a368856dca11de2a
3
+ size 11719472