{ "paper_id": "2021", "header": { "generated_with": "S2ORC 1.0.0", "date_generated": "2023-01-19T01:13:13.921806Z" }, "title": "early printed books by utilizing cross fold training", "authors": [ { "first": "Ahmad", "middle": [ "P" ], "last": "Tafti", "suffix": "", "affiliation": {}, "email": "" }, { "first": "Ahmadreza", "middle": [], "last": "Baghaie", "suffix": "", "affiliation": {}, "email": "" }, { "first": "Mehdi", "middle": [], "last": "Assefi", "suffix": "", "affiliation": {}, "email": "" }, { "first": "Hamid", "middle": [ "R" ], "last": "Arabnia", "suffix": "", "affiliation": {}, "email": "" }, { "first": "Zeyun", "middle": [], "last": "Yu", "suffix": "", "affiliation": {}, "email": "" } ], "year": "", "venue": null, "identifiers": {}, "abstract": "The Quechua linguistic family has a limited number of NLP resources, most of them being dedicated to Southern Quechua, whereas the varieties of Central Quechua have, to the best of our knowledge, no specific resources (software, lexicon or corpus). Our work addresses this issue by producing two resources for the Ancash Quechua: a full digital version of a dictionary, and an OCR model adapted to the considered variety. In this paper, we describe the steps towards this goal: we first measure performances of existing models for the task of digitising a Quechua dictionary, then adapt a model for the Ancash variety, and finally create a reliable resource for NLP in XML-TEI format. We hope that this work will be a basis for initiating NLP projects for Central Quechua, and that it will encourage digitisation initiatives for under-resourced languages.", "pdf_parse": { "paper_id": "2021", "_pdf_hash": "", "abstract": [ { "text": "The Quechua linguistic family has a limited number of NLP resources, most of them being dedicated to Southern Quechua, whereas the varieties of Central Quechua have, to the best of our knowledge, no specific resources (software, lexicon or corpus). Our work addresses this issue by producing two resources for the Ancash Quechua: a full digital version of a dictionary, and an OCR model adapted to the considered variety. In this paper, we describe the steps towards this goal: we first measure performances of existing models for the task of digitising a Quechua dictionary, then adapt a model for the Ancash variety, and finally create a reliable resource for NLP in XML-TEI format. We hope that this work will be a basis for initiating NLP projects for Central Quechua, and that it will encourage digitisation initiatives for under-resourced languages.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Abstract", "sec_num": null } ], "body_text": [ { "text": "In recent years, Quechua has become more visible in the countries where it is spoken, partly as a result of measures to strengthen its use in institutions, but also of a growing interest in these lan- the Quechua-Spanish dictionary (Menacho L\u00f3pez, 2005) , published by the Ministry of Education, which contains 971 entries and can be queried through the online platform Qichwa 2.0 3 .", "cite_spans": [ { "start": 241, "end": 253, "text": "L\u00f3pez, 2005)", "ref_id": "BIBREF6" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "An online cross-dialectal lexicon (Jacobs, 2006) , featuring about 1,800 entries for Ancash, is downloadable in spreadsheet format. This format can be easily used for NLP, but the lexicon contains some redundancies, discrepancies and formatting irregularities.", "cite_spans": [ { "start": 34, "end": 48, "text": "(Jacobs, 2006)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "The largest Ancash Quechua-Spanish dictionaries are either not officially digitised or have been published under restrictive copyright that prevent their use for NLP purposes. The main dictionaries for our variety are: Swisshelm, 1972 , 399 pages, Parker et al., 1976 Carranza Romero, 2013 , about 8,000 entries, also available as an ebook.", "cite_spans": [ { "start": 219, "end": 234, "text": "Swisshelm, 1972", "ref_id": null }, { "start": 235, "end": 267, "text": ", 399 pages, Parker et al., 1976", "ref_id": null }, { "start": 268, "end": 289, "text": "Carranza Romero, 2013", "ref_id": "BIBREF1" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "The main corpus is in paper format only. It consists of two volumes of narratives in both Quechua and Spanish (Cuentos y relatos en el Quechua de Huaraz, Ramos and Ripkens, 1974) , with a total of 698 pages. A digitised dictionary would be useful to automatically post-edit the OCR of this corpus (Poncelas et al., 2020) .", "cite_spans": [ { "start": 154, "end": 178, "text": "Ramos and Ripkens, 1974)", "ref_id": "BIBREF10" }, { "start": 297, "end": 320, "text": "(Poncelas et al., 2020)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Corpora", "sec_num": "2.1.2" }, { "text": "The importance of digitising lexical resources for under-resourced languages has been repeatedly expressed. For the languages of the Americas, two projects are particularly similar to ours.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "A off-the-shelf use of Tesseract is reported (Maxwell and Bills, 2017) (Parker, 1975) . It is an unpublished draft 137 of the Ancash Quechua to Spanish dictionary men-138 tioned above (Parker et al., 1976) This book is a (Budin et al., 2012) . The markup structure is built with the following rules :", "cite_spans": [ { "start": 45, "end": 70, "text": "(Maxwell and Bills, 2017)", "ref_id": "BIBREF5" }, { "start": 71, "end": 85, "text": "(Parker, 1975)", "ref_id": "BIBREF7" }, { "start": 184, "end": 205, "text": "(Parker et al., 1976)", "ref_id": "BIBREF8" }, { "start": 221, "end": 241, "text": "(Budin et al., 2012)", "ref_id": "BIBREF0" } ], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "\u2022 Spanish loans, marked in the dictionary by an asterisk before the word, are indicated by insertion of the tag ;", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "\u2022 Homographs are grouped in a ;", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "\u2022 Cross-references are marked with ;", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "\u2022 Easily retrievable examples within the column corresponding to the translation or gloss are tagged with .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "Our XML-TEI lexicon contains 3626 entries, and is to date the largest digital resource for Ancash Quechua available for NLP and lexicometry.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "OCR of dictionaries", "sec_num": "2.2" }, { "text": "The present work shows that it is relatively easy to train a new Tesseract model from an existing one, with very little data. The tests carried out on several OCRs show many that alternatives are available for this task depending on the desired output.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5" }, { "text": "Based on this work, we started the digitisation of a second dictionary and a corpus with the same characteristics.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "5" }, { "text": "As the OSCAR corpus https://oscar-corpus. com", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "According to the 2017 census.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": ". Cropping: cutting the file to eliminate every-", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://github.com/tesseract-ocr/ tesseract", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "trast;", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": ". Conversion to high definition PNG (between", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "and 390 dpi).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://gegl.org/ 6 https://imagemagick.org/script/ convert.php", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://github.com/impactcentre/ ocrevalUAtion", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://github.com/rumiwarmi/qishwar/ blob/main/Diccionario%20polilectal%20-% 20PARKER.ods 9 https://tei-c.org/", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null } ], "back_matter": [ { "text": "We warmly thank C\u00e9sar Itier for providing his copy of Parker's dictionary and allowing us to digitise it.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Acknowledgements", "sec_num": null }, { "text": "The last two steps are automatically applied to the whole document thanks to a bash script, using These pages are segmented by lines with the", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "annex", "sec_num": null } ], "bib_entries": { "BIBREF0": { "ref_id": "b0", "title": "Creating lexical resources in tei p5. a schema for multi-purpose digital dictionaries", "authors": [ { "first": "Gerhard", "middle": [], "last": "Budin", "suffix": "" }, { "first": "Stefan", "middle": [], "last": "Majewski", "suffix": "" }, { "first": "Karlheinz", "middle": [], "last": "M\u00f6rth", "suffix": "" } ], "year": 2012, "venue": "Journal of the Text Encoding Initiative", "volume": "", "issue": "3", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Gerhard Budin, Stefan Majewski, and Karlheinz M\u00f6rth. 2012. Creating lexical resources in tei p5. a schema for multi-purpose digital dictionaries. Journal of the Text Encoding Initiative, (3).", "links": null }, "BIBREF1": { "ref_id": "b1", "title": "Diccionario del Quechua Ancashino", "authors": [ { "first": "Francisco", "middle": [], "last": "Carranza Romero", "suffix": "" } ], "year": 2013, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Francisco Carranza Romero. 2013. Diccionario del Quechua Ancashino.", "links": null }, "BIBREF2": { "ref_id": "b2", "title": "Training & quality assessment of an optical character recognition model for Northern Haida", "authors": [ { "first": "Isabell", "middle": [], "last": "Hubert", "suffix": "" }, { "first": "Antti", "middle": [], "last": "Arppe", "suffix": "" }, { "first": "Jordan", "middle": [], "last": "Lachler", "suffix": "" }, { "first": "Eddie", "middle": [ "Antonio" ], "last": "Santos", "suffix": "" } ], "year": 2016, "venue": "Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16)", "volume": "", "issue": "", "pages": "3227--3234", "other_ids": {}, "num": null, "urls": [], "raw_text": "Isabell Hubert, Antti Arppe, Jordan Lachler, and Ed- die Antonio Santos. 2016. Training & quality as- sessment of an optical character recognition model for Northern Haida. In Proceedings of the Tenth In- ternational Conference on Language Resources and Evaluation (LREC'16), pages 3227-3234, Portoro\u017e, Slovenia. European Language Resources Associa- tion (ELRA).", "links": null }, "BIBREF4": { "ref_id": "b4", "title": "Metrics for complete evaluation of ocr performance", "authors": [ { "first": "Romain", "middle": [], "last": "Karpinski", "suffix": "" }, { "first": "Devashish", "middle": [], "last": "Lohani", "suffix": "" } ], "year": 2018, "venue": "IPCV'18-The 22nd Int'l Conf on Image Processing", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Romain Karpinski, Devashish Lohani, and Abdel Be- laid. 2018. Metrics for complete evaluation of ocr performance. In IPCV'18-The 22nd Int'l Conf on Image Processing, Computer Vision, & Pattern Recognition.", "links": null }, "BIBREF5": { "ref_id": "b5", "title": "Endangered data for endangered languages: Digitizing print dictionaries", "authors": [ { "first": "Michael", "middle": [], "last": "Maxwell", "suffix": "" }, { "first": "Aric", "middle": [], "last": "Bills", "suffix": "" } ], "year": 2017, "venue": "Proceedings of the 2nd Workshop on the Use of Computational Methods in the Study of Endangered Languages", "volume": "", "issue": "", "pages": "85--91", "other_ids": { "DOI": [ "10.18653/v1/W17-0112" ] }, "num": null, "urls": [], "raw_text": "Michael Maxwell and Aric Bills. 2017. Endangered data for endangered languages: Digitizing print dic- tionaries. In Proceedings of the 2nd Workshop on the Use of Computational Methods in the Study of Endangered Languages, pages 85-91, Honolulu. As- sociation for Computational Linguistics.", "links": null }, "BIBREF6": { "ref_id": "b6", "title": "Yachakuqkunapa Shimi Qullqa", "authors": [ { "first": "Leonel Alexander Menacho", "middle": [], "last": "L\u00f3pez", "suffix": "" } ], "year": 2005, "venue": "Anqash Qichwa Shimichaw. Ministerio de Educaci\u00f3n", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Leonel Alexander Menacho L\u00f3pez. 2005. Yachakuqku- napa Shimi Qullqa, Anqash Qichwa Shimichaw. Ministerio de Educaci\u00f3n, Lima, Per\u00fa.", "links": null }, "BIBREF7": { "ref_id": "b7", "title": "Diccionario Polilectal del Quechua de Ancash", "authors": [ { "first": "Gary", "middle": [ "J" ], "last": "Parker", "suffix": "" } ], "year": 1975, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Gary J. Parker. 1975. Diccionario Polilectal del Quechua de Ancash. Universidad Nacional Mayor de San Marcos.", "links": null }, "BIBREF8": { "ref_id": "b8", "title": "Diccionario quechua", "authors": [ { "first": "G", "middle": [ "J" ], "last": "Parker", "suffix": "" }, { "first": "A", "middle": [ "C" ], "last": "Reyes", "suffix": "" }, { "first": "A", "middle": [], "last": "Ch\u00e1vez", "suffix": "" } ], "year": 1976, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "G.J. Parker, A.C. Reyes, and A. Ch\u00e1vez. 1976. Dic- cionario quechua, Ancash-Huailas. Ministerio de Educaci\u00f3n.", "links": null }, "BIBREF9": { "ref_id": "b9", "title": "James Hadley, and Andy Way. 2020. A tool for facilitating ocr postediting in historical documents", "authors": [ { "first": "Alberto", "middle": [], "last": "Poncelas", "suffix": "" }, { "first": "Mohammad", "middle": [], "last": "Aboomar", "suffix": "" } ], "year": null, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": { "arXiv": [ "arXiv:2004.11471" ] }, "num": null, "urls": [], "raw_text": "Alberto Poncelas, Mohammad Aboomar, Jan Buts, James Hadley, and Andy Way. 2020. A tool for facilitating ocr postediting in historical documents. arXiv preprint arXiv:2004.11471.", "links": null }, "BIBREF10": { "ref_id": "b10", "title": "Cuentos y relatos en el quechua de Huaraz. Estudios culturales benedictinos", "authors": [ { "first": "S", "middle": [ "P" ], "last": "Ramos", "suffix": "" }, { "first": "J", "middle": [], "last": "Ripkens", "suffix": "" } ], "year": 1974, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "S.P. Ramos and J. Ripkens. 1974. Cuentos y relatos en el quechua de Huaraz. Estudios culturales bene- dictinos.", "links": null } }, "ref_entries": { "FIGREF0": { "type_str": "figure", "uris": null, "text": "guages as a cultural element among citizens. At the same time, Quechua languages are gradually handled by NLP software. For Southern Quechua (variety of Quechua II, the most widespread linguistic family), resources already exist and many projects are experimenting large corpus digitisation to create Deep Learning models 1 . However, Quechua varieties are heterogeneous and available resources for the aforementioned variety are hardly usable for others, because of important differences in both morphology and lexicon. The present work aims at laying foundations for the development of NLP tools for another variety, the Ancash Quechua (variety of Quechua I).", "num": null }, "FIGREF1": { "type_str": "figure", "uris": null, "text": "139list of Ancash lexemes along with their area of140 use (division by province), their POS, translation 141 or gloss in Spanish, and a set of internal cross-142 references indicating synonyms, related terms or 143 lectal variants. The overall structure is relatively 144 homogeneous. The elements mentioned above are 145 separated by blanks, but are not vertically aligned.146The typography is that of the old typewriters; some 147 typing errors remain in the document.", "num": null }, "FIGREF2": { "type_str": "figure", "uris": null, "text": "written using Latin script. In 150 the particular case of our document, the author 151 used a phonemic spelling to represent charac-152 ters whose official modern spelling is a digraph. 153 The", "num": null }, "TABREF0": { "text": "Hubert et al., 2016) for a large written corpus (100,000 words). Optimal settings discovery was conducted by training 12 models with distinct parameters. This work also experimented training the model with images generated from text using a font similar to the targeted documents, which did3 https://dic.qichwa.net/#/ not prove to be efficient. The best model, trained 123 on the original source, obtained 96.47% character 124 rate accuracy (CRA) and a 89.03% word rate accu-125 racy (WRA). Quechua in OCR tools 127 Both Tesseract 4 and ABBYY include a pretrained 128 Quechua model for OCR. ABBYY's model is 129 trained on Bolivian Quechua (Q.II). The training 130 corpus for Tesseract's model is not documented.", "html": null, "type_str": "table", "content": "
to digitise 3 bilingual dictionaries (Tzeltal-English, Muinane-Spanish, Cubeo-Spanish). More specifically, authors used Tesseract's hOCR function to preserve entry's structure and infer lexical entries with associated linguistic information. A finite state transducer was used to create the lexicon from this hOCR file. Tesseract can also be (re)trained to create ded-icated models. This has been experimented for an almost extinct Canadian language (Northern Haida) (126 2.3 131 3 OCR of the Ancash Quechua 132 Dictionary 133 3.1 Source Document 134 The document we digitised is a working document
", "num": null }, "TABREF1": { "text": "shows the special characters used 154 by Parker (in first column), their corresponding 155 phonemes, and the graphemes commonly used to-", "html": null, "type_str": "table", "content": "
156
", "num": null }, "TABREF2": { "text": "Special characters in the dictionary 2. Conversion to greyscale and increasing congegl 5 and convert 6 commands.", "html": null, "type_str": "table", "content": "
173
3.5 OCR selection
177
178performing OCR software (Tafti et al., 2016), and
179compared their output on a set of 5 pages of the
180document, randomly extracted. For Tesseract's
OCR, we used both Quechua and Spanish pre-
trained models. For ABBYY's OCR, we used the
183Bolivian Quechua model. GoogleDocs OCR does
184not allow to control any parameter. Table 2 shows
the error rates for each of them.
Tesseract ABBYY GoogleDocs
CER 6.646.435.26
WER 25.527.520.7
", "num": null }, "TABREF3": { "text": "OCR comparison on our dictionaryThis evaluation shows that GoogleDocs OCR is the struc-ture of the document is not preserved. The opposite situation occurs in the case of ABBYY. It is worth noting that the output of the latter could be greatly improved by using the numerous settings the software offers.", "html": null, "type_str": "table", "content": "
In addition to performances, we also took
in consideration the possibility to distribute the
trained model with an open licence. According
to these considerations, we chose Tesseract, which
gives satisfying results and allows the model to be
shared.
3.5.1 Preliminary tests with Tesseract OCR
In order to have a better view of Tesseract's per-
formance, we applied OCR on 10 PNG files,
randomly extracted from the pre-processed (Sec-
tion 3.4) document, using: Spanish model alone
(spa FAST); Quechua model alone (que FAST);
Spanish and Quechua models together (que+spa)
in their compressed (FAST) and uncompressed
(BEST) versions.
OCR outputs per page are concatenated into
a single file, as well as corresponding gold stan-
dards. Resulting files are compared to measure
Character Error Rate (CER) and Word Error Rate
(WER) with the ocrevalUAtion tool 7 . Table 3 re-
ports those evaluations.
The results show that OCR performance is rel-
atively poor, with a word recognition accuracy
(WRA) of less than 80%. The characters with di-
acritics presented in Section 3.2, which are absent
from the character set of Quechua and Spanish
models, are not recognised, making manual cor-
rection tedious. However, Tesseract offers the pos-
sibility to adapt a pre-trained model to additional
fonts and characters. In the next section, we de-
scribe the training of a model specific to our book,
based on Tesseract's Quechua model.
CER WER
spa FAST6.23 23.20
que FAST7.40 27.55
que+spa FAST 5.89 21.82
que+spa BEST 6.05 21.29
", "num": null }, "TABREF4": { "text": "Tesseract performance with pretrained models ; each segment is then OCRised and the output is manually corrected to constitute the gold 232 standard. The training process is done from the", "html": null, "type_str": "table", "content": "
3.6 Model training
A training corpus was built from 30 pages of
the document (5,676 words, 33,687 characters).
", "num": null }, "TABREF5": { "text": "CER and WER of the Ancash Quechua modelTo get a better idea of the impact of the training,", "html": null, "type_str": "table", "content": "
254
255we also evaluated the error rate on the characters
256with diacritics. Table 5 shows their volume in the
257training corpus (\u016b,\u0159 and\u0109 having only one or two
258occurrences, they are considered negligible) and
corresponding error rates.
Nb train Vol train (%) CER (%)
\u01611670.504.04
\u00eb1570.477.83
c1480.445.11
a1300.3963.7
i,\u0113,\u014d<0,1100
", "num": null }, "TABREF6": { "text": "", "html": null, "type_str": "table", "content": "
: Training volume and CER for special charac-
ters
260Empirically, manual correction of OCR output
261is easier with the new model: the most frequent
", "num": null } } } }