Basic Algorithm for Automatic Spelling Correction of Russian Texts: Development, Evaluation and Prospects

封面

如何引用文章

全文:

详细

Automatic spelling check and correction of texts in Russian is an urgent task in the field of natural language processing. Our research is aimed at developing, evaluating, and describing a computer programme for correcting spelling errors with high accuracy. The proposed method is based on line-by-line text processing using rules for spelling and capitalisation accuracy and a probabilistic model for proposing candidate words for error correction. Our algorithm operates at the level of individual words, which limits its ability to take context into account. The metrics used to test the quality of the model are Precision, Recall, and F1 Score. For ease of use and program refinement, we integrated automated error analysis and detailed report generation to identify the strengths and weaknesses of the algorithm. The detailed development description ensures the reproducibility of the algorithm and is in line with the Open-source ideology. The results showed that the algorithm has high Precision = 1.00, i.e., it corrects only those spelling errors that were specified in the reference text. However, the Recall = 0.84 emphasises the need for further refinement, including handling context-dependent errors and processing stable expressions. The F1 Score = 0.91 confirms the balanced performance of the algorithm and justifies its use as a basic model of text correction in Russian. The conclusions of the study emphasise the potential of the algorithm in the tasks of automatic correction of Russian-language text, and suggest prospective areas for improving the source code, such as the use of n-grams and language models. This work lays the foundation for further research in the field of automatic correction of Russian-language texts.

作者简介

E. Isaeva

Perm State University

Email: ekaterinaisae@psu.ru
Scopus 作者 ID: 57204498718
Researcher ID: O-6777-2015
Perm

B. Safarbekov

National University of Science and Technology "MISIS"

Email: behruzsafarbekov3@gmail.com
Moscow

参考

  1. Zukarnain N. et al. Spelling Checker Algorithm Methods for Many Languages // 2019 International Conference on Information Management and Technology (ICIMTech). IEEE, 2019. P. 198-201. doi: 10.1109/ICIMTech.2019.8843801.
  2. Hamrouni B.M. Logic compression of dictionaries for multilingual spelling checkers // Proceedings of the 15th conference on Computational linguistics Morristown, NJ, USA: Association for Computational Linguistics, 1994. P. 292. doi: 10.3115/991886.991936.
  3. Lokhande H.A. et al. Enhancing Text Quality with Bi-LSTM: An Approach for Automated Spelling and Grammar Correction // 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS). IEEE, 2024. P. 01-07. doi: 10.1109/ADICS58448.2024.10533521.
  4. Mangu L., Brill E. Automatic Rule Acquisition for Spelling Correction // Proceedings of the Fourteenth International Conference on Machine Learning (ICML '97). San Francisco, CA, USA: Morgan Kaufmann Publishers Inc, 1997. P. 187-194.
  5. Davrondjon G., Janowski T. Developing a Spell-Checker for Tajik Using RAISE // Formal Methods and Software Engineering. ICFEM 2002. Lecture Notes in Computer Science / ed. George C., Miao H. Berlin, Heidelberg: Springer, 2002. Vol. 2495. P. 401-405. doi: 10.1007/3-540-36103-0_41 EDN: XNBRMD.
  6. Atawy S.M. El, ElGhany A.A. Automatic Spelling Correction based on n-Gram Model // Int J Comput Appl. 2018. Vol. 182, No 11. P. 5-9.
  7. Chen K.-Y., Wang H.-M., Chen H.-H. A Probabilistic Framework for Chinese Spelling Check // ACM Transactions on Asian and Low-Resource Language Information Processing. 2015. Vol. 14, No 4. P. 1-17. doi: 10.1145/2826234.
  8. Sasu L. A Probabilistic Model for Spelling Correction // Bulletin of the Transilvania University of Brasov. Series III: Mathematics, Informatics, Physics. 2011. Vol. 4(53), No 2. P. 141-146.
  9. Kashyap R.L., Oommen B.J. Spelling correction using probabilistic methods // Pattern Recognit Lett. 1984. Vol. 2, No 3. P. 147-154. doi: 10.1016/0167-8655(84)90038-2
  10. Chen S.F. Building Probabilistic Models for Natural Language. 1996.
  11. Flachs S., Lacroix O., Søgaard A. Noisy Channel for Low Resource Grammatical Error Correction // Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications. Stroudsburg, PA, USA: Association for Computational Linguistics, 2019. P. 191-196. doi: 10.18653/v1/W19-4420.
  12. Li Y., Anastasopoulos A., Black A.W. Towards Minimal Supervision BERT-Based Grammar Error Correction (Student Abstract) // Proceedings of the AAAI Conference on Artificial Intelligence. 2020. Vol. 34, No 10. P. 13859-13860. doi: 10.1609/aaai.v34i10.7202 EDN: QHFSCJ.
  13. Khabutdinov I.A. et al. RuGECToR: Rule-Based Neural Network Model for Russian Language Grammatical Error Correction // Programming and Computer Software. Pleiades Publishing, 2024. Vol. 50, No 4. P. 315-321. doi: 10.1134/S0361768824700129 EDN: XCUPYE.
  14. Martynov N. et al. A Methodology for Generative Spelling Correction via Natural Spelling Errors Emulation across Multiple Domains and Languages. 2023.
  15. Kaggle: Your Machine Learning and Data Science Community [Electronic resource]. URL: https://www.kaggle.com/ (accessed: 07.02.2025).
  16. Hugging Face - The AI community building the future. [Electronic resource]. URL: https://huggingface.co/ (accessed: 07.02.2025).
  17. Language-tool-python.PyPI [Electronic resource]. URL: https://pypi.org/project/language-tool-python/ (accessed: 11.12.2024).
  18. Hunspell download SourceForge.net [Electronic resource]. URL: https://sourceforge.net/projects/hunspell/ (accessed: 02.02.2025).
  19. Goslin K., Hofmann M. English Language Spelling Correction as an Information Retrieval Task Using Wikipedia Search Statistics // Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022). Marseille: European Language Resources Association (ELRA), 2022. P. 458-464.
  20. SymSpell, Github [Electronic resource]. URL: https://github.com/wolfgarbe/SymSpell (accessed: 02.02.2025).
  21. Audah H.A., Yuliawati A., Alfina I. A Comparison Between SymSpell and a Combination of Damerau-Levenshtein Distance with the Trie Data Structure // 2023 10th International Conference on Advanced Informatics: Concept, Theory and Application (ICAICTA). IEEE, 2023. P. 1-6. doi: 10.1109/ICAICTA59291.2023.10390399.
  22. Проверка орфографии, грамматики и стилистики онлайн - LanguageTool [Electronic resource]. URL: https://languagetool.org/ru (accessed: 02.02.2025).
  23. Sorokin A.A., Shavrina T. Automatic spelling correction for Russian social media texts // Dialogue, International Conference on Computational Linguistics. Moscow: URL: https://www.researchgate.net/publication/303813582_Automatic_spelling_correction_for_Russian_social_media_texts, 2016. EDN: XMWHDK (accessed: 02.02.2025).
  24. Pandas 2.2.3 documentation [Electronic resource]. URL: https://pandas.pydata.org/docs/ (accessed: 02.02.2025).

补充文件

附件文件
动作
1. JATS XML


Creative Commons License
此作品已接受知识共享署名 4.0国际许可协议的许可

Согласие на обработку персональных данных с помощью сервиса «Яндекс.Метрика»

1. Я (далее – «Пользователь» или «Субъект персональных данных»), осуществляя использование сайта https://journals.rcsi.science/ (далее – «Сайт»), подтверждая свою полную дееспособность даю согласие на обработку персональных данных с использованием средств автоматизации Оператору - федеральному государственному бюджетному учреждению «Российский центр научной информации» (РЦНИ), далее – «Оператор», расположенному по адресу: 119991, г. Москва, Ленинский просп., д.32А, со следующими условиями.

2. Категории обрабатываемых данных: файлы «cookies» (куки-файлы). Файлы «cookie» – это небольшой текстовый файл, который веб-сервер может хранить в браузере Пользователя. Данные файлы веб-сервер загружает на устройство Пользователя при посещении им Сайта. При каждом следующем посещении Пользователем Сайта «cookie» файлы отправляются на Сайт Оператора. Данные файлы позволяют Сайту распознавать устройство Пользователя. Содержимое такого файла может как относиться, так и не относиться к персональным данным, в зависимости от того, содержит ли такой файл персональные данные или содержит обезличенные технические данные.

3. Цель обработки персональных данных: анализ пользовательской активности с помощью сервиса «Яндекс.Метрика».

4. Категории субъектов персональных данных: все Пользователи Сайта, которые дали согласие на обработку файлов «cookie».

5. Способы обработки: сбор, запись, систематизация, накопление, хранение, уточнение (обновление, изменение), извлечение, использование, передача (доступ, предоставление), блокирование, удаление, уничтожение персональных данных.

6. Срок обработки и хранения: до получения от Субъекта персональных данных требования о прекращении обработки/отзыва согласия.

7. Способ отзыва: заявление об отзыве в письменном виде путём его направления на адрес электронной почты Оператора: info@rcsi.science или путем письменного обращения по юридическому адресу: 119991, г. Москва, Ленинский просп., д.32А

8. Субъект персональных данных вправе запретить своему оборудованию прием этих данных или ограничить прием этих данных. При отказе от получения таких данных или при ограничении приема данных некоторые функции Сайта могут работать некорректно. Субъект персональных данных обязуется сам настроить свое оборудование таким способом, чтобы оно обеспечивало адекватный его желаниям режим работы и уровень защиты данных файлов «cookie», Оператор не предоставляет технологических и правовых консультаций на темы подобного характера.

9. Порядок уничтожения персональных данных при достижении цели их обработки или при наступлении иных законных оснований определяется Оператором в соответствии с законодательством Российской Федерации.

10. Я согласен/согласна квалифицировать в качестве своей простой электронной подписи под настоящим Согласием и под Политикой обработки персональных данных выполнение мною следующего действия на сайте: https://journals.rcsi.science/ нажатие мною на интерфейсе с текстом: «Сайт использует сервис «Яндекс.Метрика» (который использует файлы «cookie») на элемент с текстом «Принять и продолжить».