Mākoņbalstīta mašīnmācība pielāgotos risinājumos: izglītojošu materiālu tulkošana, izmantojot Google AutoML tulkošanu.
Author
Melnūdre, Roze
Co-author
Latvijas Universitāte. Datorikas fakultāte
Advisor
Pudāne, Māra
Date
2023Metadata
Show full item recordAbstract
Šī bakalaura darba ietvaros tika izveidota mākslīgajā intelektā balstīta subtitru tulkošanas sistēma, kas specializēta tieši lekciju video subtitru tulkošanai no angļu valodas latviešu valodā. Tā kā izglītības programma Latvijā ir mainīga un bieži tiek papildināta ar jaunām prasmēm un zināšanām, kas jauniešiem jāapgūst, lai spētu konkurēt darba tirgū, ir vajadzīgi arvien jauni mācību materiāli. Tā vietā, lai radītu jaunas mācību grāmatas un citus materiālus, tulkot esošus materiālus, ko radījuši uzticami avoti, piemēram, pasaulē vadošās augstskolas, kā Harvardas universitāte, nozīmē ietaupīt resursus, samazinot veicamo darbu. Šāda pieeja ļauj gan veidot uzticamus materiālus bez kļūdām, gan radina jauniešus pie patstāvīga darba un starptautiskās augstskolās īstenotā mācību procesa. Bakalaura darba ietvaros tika tulkots Hārvardas universitātes kursa “Ievads datorzinātnē” saturs lekciju subtitru formātā. Sistēmas radīšanu un tai izvēlētās tehnoloģijas pamato eksistējošo risinājumu apraksts literatūras apskatā, kur lasāms par mašīntulkošanas un SRT failu specifiku. Sistēmas veidošanai izmantots Google AutoML Translation trenējamais mašīnmācīšanās modelis tulkošanai, kā arī Python valoda datu un failu apstrādei. Google AutoML Translation modeļa divreizējai apmācībai izmantoti profesionālu tulku tulkoti Hārvardas universitātes kursa “Ievads datorzinātnē” lekciju subtitri. Pirmajai apmācībai tika izmantoti 422 teikumi no lekciju satura. Otrajai apmācībai tika izmantoti apmēram 1000 konkrētu terminu vai īsu frāžu tulkojumi no lekciju satura. Apmācīto modeļu tulkojumu kvalitāte tiek mērīta, izvēloties nejaušus fragmentus no trenētā modeļa tulkoto tekstu kopas un manuāli izvērtējot tos Multidimensionālās Kvalitātes Metrikas (MQM) kontekstā, kā arī dokumentējot Google rēķināto BLEU metriku. Pirmais modelis pēc trenēšanas BLEU skalā vērtējams ar 69.15. 2-4% teikumu, salīdzinot ar netrenēta modeļa tulkojumiem, vērojamas izmaiņas. Izvērtējot nejaušus fragmentus MQM kontekstā, secināts, ka modeļa tulkojumu galvenās kļūdas ir neprecīzas nozīmes tulkojumi, stila kļūdas un terminoloģijas kļūdas. Otrais modelis sasniedza 66.29 BLEU vērtējumu. Salīdzinot ar pirmo modeli, otrais 311 teikumus tulkoja citādi, no kuriem 197 tulkojumu kvalitāte uzlabojās, bet 114 – kļuva zemāka. Galvenie uzlabojumi bija vērojami tieši, uzlabojot neprecīzas nozīmes tulkojumus un stila kļūdas. Augsto BLEU vērtējumu izskaidro tulkojumu strukturālā līdzība ar oriģināliem. Mazā treniņu datu apjoma dēļ modelis nespēja iemācīties latviešu valodai raksturīgo teikumu struktūru, frazeoloģismu tulkojumus un gramatikas sakarības. Tādēļ ir saglabājusies liela līdzība ar bāzes modeļa tulkojumiem, tikai atsevišķi vārdi vai vārdu kārtība ir mainījusies. Mācību procesā šādi tulkojumi nav derīgi, jo tos ir grūti saprast. Papildus grūtības rodas tādēļ, ka tulkojamais teksts ir dokumentēta cilvēka runa – fragmentāra, ar atkārtotiem vārdiem un vietām neskaidru struktūru un sarunvalodas stilā veidota. Papildus sarežģītajam uzdevumam, rezultāta sasniegšanu traucēja ierobežotā piekļuve resursiem, piemēram, Google AutoML Translation modeļa trenēšanai, kā arī laika trūkums, kā dēļ nebija iespējams modeļu tulkojumu vērtēšanai piesaistīt profesionālus tulkus. Lai gan otrajā trenēšanas reizē tikai sasniegti kvalitātes uzlabojumi, netika izpildīts mērķis sasniegt tulkojumu kvalitāti pietiekamu, lai pēc tulkošanas dati nebūtu papildus jāuzlabo. Izstrādātā darba rezultātā ir pieejama tulkošanas sistēma, kas ar papildus trenēšanu var sasniegt kvalitatīvus tulkojumus. Svarīgākais turpmākā darba uzdevums ir veidot plašu treniņa datu kopu, kurā pastāvīgi un dažādi izmantoti pareizi terminu tulkojumi nav stila un gramatikas kļūdu. Šis diplomdarbs ir rakstīts angļu valodā, tas satur 70 lapas, 7 attēlus, 4 tabulas, 3 pielikumus, katru 2 tabulas saturošus, un 52 avotus. Atslēgvārdi: mašīntulkošana, Google AutoML, subtitru tulkošana, mācību materiāli Up-to-date quality educational materials are crucial for an effective educational process, especially with the lack of teaching staff state wide in Latvia. Instead of developing new materials, time and resource costs can be reduced by using existing high-quality material. An example is online courses organized by the Harvard University that cover topics relevant for both university and high school students. This thesis aims to provide a system for localizing the online courses provided and used by Harvard University for Latvian university and high-school students. The Introduction to Computer Science course used in this thesis consists of a set of lectures, short videos on specific topics and problem sets. The course is localized by translating the lecture and short video subtitles from English to Latvian. A subtitle translation system that produces a subtitle file in Latvian from a subtitle file in English was designed and implemented. A Python program processes subtitle files and communicates with other parts of the system: A MySQL database and the translation engine. The translation is powered using Google AutoML Translation, which is a cloud-based machine-learning model customizable with individualized training data. This is used to improve translation quality in the computer science domain. For the two iterations of training, a selection of subtitles files from Harvard University’s Introduction to Computer Science course is translated professionally. For the first training, 422 full sentence pairs were used. For the second training, 1000 short heavily context-dependent phrase and term pairs were extracted from the course subtitles. Both models were evaluated through the Bilingual Evaluation Understudy (BLEU). Apart from the metric, the models were evaluated manually by applying the Multidimensional Quality Metric (MQM) to a set of randomly chosen sentences from course subtitle files translated by the trained models. The first and second models achieved, respectively, 69.15 and 66.29 BLEU scores with no performance gain over the base model of Google. The MQM evaluation of translations of the first model indicated Accuracy, Style and Terminology problems with respectively 68, 49 and 41 error instances in a set of 129 sentences. The second model translated 311 sentences differently than the first. From those, 197 showed improvements on mainly the Accuracy and Style error areas; however, 114 of them showed either no improvement in translation quality or deterioration in it. A working system for subtitle translation has been implemented, achieving improved translation quality with the second model; however, translation quality that does not need manual improvement was not achieved. It is directly connected with the small amount of training data available, in total approximately 2000 pairs compared to previously reported training data sizes of million data points and more. The translations of specific computer science terms and phrases were also inconsistent. Due to that, the models were not able to draw patterns on correct term translations and grammar constructs but instead translated text directly, preserving the structure of the source text. This resulted in high BLEU scores but poor style and limited readability. Further limitations in time and resource availability resulted in the author evaluating translations herself instead of surveying a group of professional translators on translation quality. A final limitation is the irregular, fragmented and colloquial nature of subtitles as a document of speech. Therefore, a beneficial future research direction is pre-processing the text to be fluent and more formal, developing more concise and simpler text. Roze Melnūdre 3till, the most important task for the future is to generate and accumulate thousands of data points for training model. This paper is written on 70 pages, it includes seven figures, three tables, three appendices with two tables each, and 52 sources. Ke