{"id":395693,"date":"2024-06-29T12:22:13","date_gmt":"2024-06-29T12:22:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=395693"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=395693","title":{"rendered":"<span>\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u043c\u0430\u043b\u043e\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mw\/va\/l8\/mwval8iyyt6sqatgboeg5i_878k.png\" data-src=\"https:\/\/habrastorage.org\/webt\/mw\/va\/l8\/mwval8iyyt6sqatgboeg5i_878k.png\"\/>  <\/p>\n<p><em>\u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u0431\u044b\u043b \u0433\u043e\u0434: \u043d\u0430\u043b\u043e\u0433\u0438, \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b, \u0431\u0430\u043d\u0434\u0438\u0442\u0438\u0437\u043c \u0438 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0421 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0431\u044b\u043b\u043e \u043d\u0435\u043b\u044c\u0437\u044f&#8230;<\/em><\/p>\n<p>  <\/p>\n<p><em>Upd. 04.12.2021 \u2014 <a href=\"https:\/\/t.me\/lingtrain_books\" rel=\"nofollow noopener noreferrer\">\u041d\u0430\u0448 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u043a\u0430\u043d\u0430\u043b<\/a><\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0440\u043e\u0434\u043e\u0432, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 270 \u044f\u0437\u044b\u043a\u0430\u0445. \u041e\u043a\u043e\u043b\u043e 150 \u044f\u0437\u044b\u043a\u043e\u0432 \u043d\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 1 \u0442\u044b\u0441\u044f\u0447\u0438 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u0439, \u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 20 \u043b\u0435\u0442 7 \u044f\u0437\u044b\u043a\u043e\u0432 \u0443\u0436\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u043e.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u043c\u043e\u0438 &#171;\u043f\u044f\u0442\u044c \u043a\u043e\u043f\u0435\u0435\u043a&#187; \u043f\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f. \u0415\u0433\u043e \u0446\u0435\u043b\u044c \u2014 \u043f\u043e\u043c\u043e\u0449\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430, \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c, \u0440\u0430\u0434\u0435\u044e\u0449\u0438\u043c \u0437\u0430 \u0441\u0432\u043e\u0439 \u0440\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a. \u041f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u044b\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u0432<\/strong>, \u2014 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e &#171;\u0442\u043e\u043f\u043b\u0438\u0432\u0430&#187;, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u0435\u0435 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u2014 <strong>\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439<\/strong> \u0438 <strong>\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439<\/strong>, \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u043d\u043e \u043e\u0431\u0449\u0430\u043b\u0441\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u043e\u0440\u043f\u0443\u0441 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432 \u0441\u0440\u0435\u0434\u0435 Colab&#8217;\u0430, \u0447\u0442\u043e\u0431\u044b \u043b\u044e\u0431\u043e\u0439 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0441\u043c\u043e\u0433 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"i-izvlekaem-parallelnyy-korpus\">I. \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 python&#8217;\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>lingtrain_aligner<\/strong>. \u041a\u043e\u0434 \u0443 \u043d\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u044f\u0434 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0441\u0432\u043e\u0438. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f LaBSE. \u041e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0430 109 \u044f\u0437\u044b\u043a\u0430\u0445. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u043e \u0434\u043b\u044f \u043d\u0438\u0445 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 (<em>\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u043c<\/em> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442) \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"colab\">Colab<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u043e\u0440\u043f\u0443\u0441 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1D1Ru9PEWdqfSyoFX4gYl-xU_Kc3a_CJp\" rel=\"nofollow noopener noreferrer\">\u044d\u0442\u043e\u043c Colab&#8217;e<\/a>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"ustanovka\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">pip install lingtrain_aligner<\/code><\/pre>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from lingtrain_aligner import splitter, aligner, resolver, metrics<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0438 \u0442\u0435\u043a\u0441\u0442\u044b (\u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0433\u043b\u0430\u0432\u0443 \u0438\u0437 \u0413\u0430\u0440\u0440\u0438 \u041f\u043e\u0442\u0442\u0435\u0440\u0430) \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <strong>splitter<\/strong>. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f (sqlite \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445) \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0432 \u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <strong>aligner<\/strong>.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">lang_from = \"en\" lang_to = \"ru\" db_path = \"alignment.db\"  splitted_from = splitter.split_by_sentences(text1.split('\\n'), lang_from) splitted_to = splitter.split_by_sentences(text2.split('\\n'), lang_to)  aligner.fill_db(db_path, lang_from, lang_to, splitted_from, splitted_to)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u044f\u0437\u044b\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u043e\u0431\u044b\u0435 \u0432\u0438\u0434\u044b \u043a\u0430\u0432\u044b\u0447\u0435\u043a, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u044d\u043a\u0437\u043e\u0442\u0438\u043a\u0430) \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 <em>splitter<\/em> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">aligner.align_db(db_path,                 model_name=\"sentence_transformer_multilingual_labse\",                 batch_size=200,                 window=50,                 batch_ids=[],                 save_pic=False,                 embed_batch_size=5,                 normalize_embeddings=True,                 show_progress_bar=True,                 shift=0)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043b\u0443\u0447\u0448\u0435\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u0434\u0435\u0442 \u0431\u0430\u0442\u0447\u0430\u043c\u0438 (\u043e\u0442\u0440\u0435\u0437\u043a\u0430\u043c\u0438). \u041c\u0435\u0436\u0434\u0443 \u0431\u0430\u0442\u0447\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0445\u043b\u0435\u0441\u0442 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>window<\/em>). \u041f\u043e\u0442\u043e\u043a \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>shift<\/em>). \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/557664\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"vizualizaciya\">\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <strong>vis_helper<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from lingtrain_aligner import vis_helper  vis_helper.visualize_alignment_by_db(db_path,         output_path=\"alignment_vis.png\",         batch_size=500,         size=(900,900),         lang_name_from=lang_from,         lang_name_to=lang_to,         batch_ids=[],         plt_show=True,         show_info=False)  print(\"score:\", metrics.chain_score(db_path))<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ab7\/602\/dd6\/ab7602dd67968eae53cdd145662c75d4.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ab7\/602\/dd6\/ab7602dd67968eae53cdd145662c75d4.png\"\/>  <\/p>\n<h3 id=\"metrika\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u043c\u0435\u0442\u0440\u0438\u043a\u0443, \u043b\u043e\u0433\u0438\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <strong>metrics<\/strong>. \u041e\u043d\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f. \u0426\u0435\u043f\u043e\u0447\u043a\u0430 \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u044b\u0432\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c score = 1, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0442\u043e\u0447\u0435\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c score = 0.<\/p>\n<p>  <\/p>\n<h3 id=\"razreshenie-konfliktov\">\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0441\u043e \u0441\u0442\u0438\u043b\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430, \u0442\u0430\u043a \u0438 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043d\u0430 \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u043e\u043c). \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0441\u043a\u043b\u0435\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043b\u0438\u0431\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e. \u042d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <strong>resolver<\/strong>. \u041e\u043d \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u043e\u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b. \u0421\u0430\u043c\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c UI, \u043e \u043d\u0435\u043c \u043d\u0438\u0436\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0432\u0441\u0435 \u0432\u044b\u043f\u0430\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">steps = 3  for i in range(steps):     conflicts, rest = resolver.get_all_conflicts(db_path,                         min_chain_length=2+i,                         max_conflicts_len=6*(i+1),                         batch_id=-1)      resolver.resolve_all_conflicts(db_path, conflicts, model_name, show_logs=False)      if len(rest) == 0:         break<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/c26\/883\/665\/c268836656551e21170b419f1be7b98b.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c26\/883\/665\/c268836656551e21170b419f1be7b98b.png\"\/>  <\/p>\n<h3 id=\"rezultat\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<p>  <\/p>\n<p>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f, \u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0418\u0437 \u0431\u0430\u0437\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 TMX.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from lingtrain_aligner import saver  output_path=\"\/content\"  saver.save_plain_text(db_path, os.path.join(output_path, f\"corpora_{lang_from}.txt\"), direction=\"from\", batch_ids=[]) saver.save_plain_text(db_path, os.path.join(output_path, f\"corpora_{lang_to}.txt\"), direction=\"to\", batch_ids=[])  saver.save_tmx(db_path, os.path.join(output_path, f\"corpora.tmx\"), lang_from, lang_to)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u0440\u044b\u0432\u043e\u043a \u0438\u0437 <em>corpora.tmx<\/em>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/7e0\/d4f\/e31\/7e0d4fe31478d7559a6076574edad1c6.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7e0\/d4f\/e31\/7e0d4fe31478d7559a6076574edad1c6.png\"\/>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0432 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b, \u043c\u044b \u0438\u0437 344 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0438 372 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441 \u0438\u0437 332 \u0441\u0442\u0440\u043e\u043a. \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043a\u043d\u0438\u0433\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u043e\u0434\u0447\u0430\u0441 \u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442 \u0441 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e\u043c, \u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0438 \u0438\u043c\u0435\u043d.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a \u0441\u043a\u043b\u043e\u043d\u0435\u043d \u0434\u0430\u0436\u0435 &#171;\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c&#187; \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 &#171;\u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d\u0430 \u043a\u043e\u043b\u0435\u0446&#187; \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u0422\u0435\u043d\u044c \u0443\u043b\u044b\u0431\u043a\u0438 \u043f\u0440\u043e\u043c\u0435\u043b\u044c\u043a\u043d\u0443\u043b\u0430 \u043d\u0430 \u0431\u043b\u0435\u0434\u043d\u043e\u043c, \u0431\u0435\u0437 \u043a\u0440\u043e\u0432\u0438\u043d\u043a\u0438, \u043b\u0438\u0446\u0435 \u0411\u043e\u0440\u043e\u043c\u0438\u0440\u0430.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Boromir smiled.<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"ii-fine-tuning-dlya-novogo-yazyka\">II. Fine-tuning \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043c\u0430\u043b\u044b\u043c \u044f\u0437\u044b\u043a\u0430\u043c. \u041c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0442\u044c \u0438 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 &#171;\u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442&#187; \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430 \u044f\u0437\u044b\u043a\u043e\u0432, \u043d\u043e \u0441 \u043d\u043e\u0432\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c.<\/p>\n<p>  <\/p>\n<h3 id=\"colab-1\">Colab<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u043c\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u043a\u043e\u0434 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1q19s_LD9hGSBrh_BR4RKX9UWq1S1ggDz\" rel=\"nofollow noopener noreferrer\">\u044d\u0442\u043e\u043c Colab&#8217;e<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"bashkirskiy-yazyk\">\u0411\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437 &#171;\u0411\u0430\u0442\u044f \u042f\u043b\u0430\u043b\u0435\u0442\u0434\u0438\u043d&#187; \u041c\u0443\u0441\u0442\u0430\u044f \u041a\u0430\u0440\u0438\u043c\u0430 \u043d\u0430 \u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u043e\u043c \u0438 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0430\u0445. \u041f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0447\u0442\u043e \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/45d\/759\/c3c\/45d759c3cd7ee2a9110840380f8cd3b3.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/45d\/759\/c3c\/45d759c3cd7ee2a9110840380f8cd3b3.png\"\/>  <\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0443\u0436\u0435, \u0445\u043e\u0442\u044f \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435. \u0421 \u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e? \u0421 \u0442\u0435\u043c, \u0447\u0442\u043e LaBSE \u0431\u044b\u043b\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 \u0442\u0430\u0442\u0430\u0440\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u042d\u0442\u0438 \u044f\u0437\u044b\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u043a\u0432.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u0442\u043e \u043e\u043d, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"fine-tuning\">Fine-tuning<\/h3>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a Google \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0417\u0430\u0434\u0430\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430, \u0431\u044b\u043b <strong>translation ranking task<\/strong>. \u0418\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 <a href=\"https:\/\/ai.googleblog.com\/2020\/08\/language-agnostic-bert-sentence.html\" rel=\"nofollow noopener noreferrer\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a>):<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cea\/8b1\/9c2\/cea8b19c28ed1d8986a160a2502024ea.gif\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cea\/8b1\/9c2\/cea8b19c28ed1d8986a160a2502024ea.gif\"\/>  <\/p>\n<p>\u0412 \u043e\u0431\u0435\u0440\u0442\u043a\u0435 \u043d\u0430\u0434 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b (\u0430 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/www.sbert.net\/\" rel=\"nofollow noopener noreferrer\">sentence_transformers<\/a>) \u0435\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440 loss&#8217;\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0430\u044e\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">pip install transformers sentencepiece sentence_transformers<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442 \u0438 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from sentence_transformers import SentenceTransformer, SentencesDataset, losses from sentence_transformers.readers import InputExample from sentence_transformers.evaluation import SentenceEvaluator from torch.utils.data import DataLoader  model = SentenceTransformer('LaBSE')<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u043c\u044b \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0438\u0442\u0430\u0432 <a href=\"https:\/\/www.sbert.net\/docs\/package_reference\/losses.html\" rel=\"nofollow noopener noreferrer\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>, \u044f \u043d\u0430\u0448\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u042d\u0442\u043e <strong>MultipleNegativesRankingLoss<\/strong>, <strong>ContrastiveLoss<\/strong> \u0438 <strong>OnlineContrastiveLoss<\/strong>. \u0412 \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 0 \u0438\u043b\u0438 1. 1 \u2014 \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430 \u0441\u0442\u0440\u043e\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438 \u043d\u0430\u0434\u043e \u0441\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, 0 \u2014 \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u0438\u0445 \u0440\u0430\u0441\u0442\u0430\u0449\u0438\u0442\u044c. MultipleNegativesRankingLoss \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e <a href=\"https:\/\/github.com\/UKPLab\/sentence-transformers\/blob\/master\/sentence_transformers\/losses\/MultipleNegativesRankingLoss.py\" rel=\"nofollow noopener noreferrer\">\u043a\u043e\u0434\u0443<\/a> \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043b\u043e\u0441\u0441\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <strong>\u0438\u0437 \u0431\u0430\u0442\u0447\u0430<\/strong> \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0442\u044c\u0441\u044f, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2014 \u043e\u0442\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f. \u0410\u0432\u0442\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e, \u0438 \u0432 \u0445\u043e\u0434\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u043c\u0443 \u0432\u0438\u0434\u0443 \u0441\u0432\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0434\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e. \u0414\u043b\u044f \u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u044b \u0432 \u043b\u0438\u0446\u0435 \u0410\u0439\u0433\u0438\u0437\u0430 \u041a\u0443\u043d\u0430\u0444\u0438\u043d\u0430 \u0438 \u0418\u0441\u043a\u0430\u043d\u0434\u0435\u0440\u0430 \u0428\u0430\u043a\u0438\u0440\u043e\u0432\u0430. \u042d\u0442\u043e <a href=\"https:\/\/github.com\/AigizK\/bashkort-parallel-corpora\" rel=\"nofollow noopener noreferrer\">\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439<\/a> \u0440\u0443\u0441\u0441\u043a\u043e-\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">train_examples = [InputExample(texts=[x['ba'], x['ru']], label=1) for x in train_dataset]  train_dataset = SentencesDataset(train_examples, model) train_dataloader = DataLoader(train_dataset, shuffle=True, batch_size=train_batch_size)  train_loss = losses.MultipleNegativesRankingLoss(model=model)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">num_epochs = 3  warmup_steps = math.ceil(len(train_dataloader) * 0.1 * num_epochs)  model.fit(train_objectives=[(train_dataloader, train_loss)],         evaluator=evaluator,         epochs=num_epochs,         evaluation_steps=1000,         output_path=model_save_path,         save_best_model=True,         use_amp=True,         warmup_steps=warmup_steps)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 evaluator&#8217;\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 <em>evaluation_steps<\/em> \u0448\u0430\u0433\u043e\u0432, \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u043b\u0430\u0441\u0441 <em>ChainScoreEvaluator<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/434\/82c\/755\/43482c755e9735f74f521c327932f545.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/434\/82c\/755\/43482c755e9735f74f521c327932f545.png\"\/>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e Colab \u0445\u043e\u0442\u044c \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438. \u042d\u0442\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0431\u0430\u0442\u0447\u0430 \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u043e\u0444\u043e\u0440\u043c\u0438\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0437\u0430 $10 \u0432 \u043c\u0435\u0441\u044f\u0446 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 750 \u0440\u0443\u0431\u043b\u0435\u0439).<\/p>\n<p>  <\/p>\n<h3 id=\"uluchshenie\">\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0414\u043e\u043e\u0431\u0443\u0447\u0438\u0432 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043d\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Colab&#8217;e, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ee1\/781\/41b\/ee178141bbc549d87fc5ab1b6113d599.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ee1\/781\/41b\/ee178141bbc549d87fc5ab1b6113d599.png\"\/>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u043f\u0430\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/08b\/4df\/bcf\/08b4dfbcfde6a0c4a9935547ec8243e7.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/08b\/4df\/bcf\/08b4dfbcfde6a0c4a9935547ec8243e7.png\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/8f7\/364\/9d1\/8f73649d1cffaba98226e2d772676c66.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8f7\/364\/9d1\/8f73649d1cffaba98226e2d772676c66.png\"\/>  <\/p>\n<h4 id=\"chuvashskiy-yazyk\">\u0427\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a<\/h4>\n<p>  <\/p>\n<p>\u0421 \u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u0432 \u0440\u0430\u0437\u044b \u0445\u0443\u0436\u0435. \u042f\u0437\u044b\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u0442\u044e\u0440\u043a\u0441\u043a\u0438\u0445 \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/57c\/9da\/9b1\/57c9da9b1c9f0cd6ed84b8b84169a96c.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/57c\/9da\/9b1\/57c9da9b1c9f0cd6ed84b8b84169a96c.png\"\/>  <\/p>\n<p>\u0417\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0443 \u0410\u043d\u0442\u043e\u043d\u043e\u0432\u0443, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u0447\u0443\u0432\u0430\u0448\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u0420\u0443\u0441\u0441\u043a\u043e-\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/www.statmt.org\/wmt21\/unsup_and_very_low_res.html\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/b6a\/1e4\/7fd\/b6a1e47fd4702cd5834435251f221c4c.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b6a\/1e4\/7fd\/b6a1e47fd4702cd5834435251f221c4c.png\"\/>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/8d0\/6c0\/10b\/8d06c010b0a438ab81fb115b71c3161f.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8d0\/6c0\/10b\/8d06c010b0a438ab81fb115b71c3161f.png\"\/>  <\/p>\n<p><em>corpora.tmx<\/em><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/19b\/d71\/d36\/19bd71d36c27400520b5412e23b7502f.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/19b\/d71\/d36\/19bd71d36c27400520b5412e23b7502f.png\"\/>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u044f \u0441\u043e\u0431\u0440\u0430\u043b Colab \u0441 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e Colab&#8217;\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0438 GPU, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0438\u0434\u0443\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0412 <a href=\"https:\/\/colab.research.google.com\/drive\/1D1Ru9PEWdqfSyoFX4gYl-xU_Kc3a_CJp\" rel=\"nofollow noopener noreferrer\">\u044d\u0442\u043e\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435<\/a> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"validaciya\">\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0440\u043f\u0443\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0439 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430\u043c\u0438 (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u0435\u043a\u0442\u043e\u0440 \u0447\u0438\u0441\u0435\u043b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044e) \u0438 \u043e\u0442\u0441\u0435\u0447\u044c \u0441\u0430\u043c\u044b\u0435 \u0434\u0430\u043b\u0435\u043a\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u043f\u0430\u0440\u044b.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u0439 \u044f\u0437\u044b\u043a\u0430. \u0422\u0430\u043a \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u0433\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u0435\u0442 \u043d\u0430 \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0430\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u0435\u0442\u0435 \u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u043c, \u0442\u043e <a href=\"https:\/\/t.me\/bashkort_translate_bot\" rel=\"nofollow noopener noreferrer\">\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/colab.research.google.com\/drive\/1D1Ru9PEWdqfSyoFX4gYl-xU_Kc3a_CJp\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"ui\">UI<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b UI. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0435\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/post\/564944\/\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/l8\/4y\/29\/l84y29mmfv4yp343nsn-zmaiif4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/l8\/4y\/29\/l84y29mmfv4yp343nsn-zmaiif4.jpeg\" data-blurred=\"true\"\/>  <\/p>\n<p>\u0412 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043f\u0443\u0441\u0430, \u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 <a href=\"https:\/\/habr.com\/ru\/post\/575898\/\">\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043d\u0438\u0433\u0438<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"idei\">\u0418\u0434\u0435\u0438<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438. \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0442\u0438\u043b\u044f, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u0441\u0445\u043e\u0436\u0435\u0439 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u043e\u0439 \u0438 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0439 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043c\u0435\u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0443\u043a\u0432 \u043d\u0430 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435\u0442 (\u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0436\u0435 \u0447\u0443\u0432\u0430\u0448\u0441\u043a\u043e\u0433\u043e). \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0434\u0435\u0438 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443, \u0442\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0434\u0430, \u0447\u0443\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u043b, \u2014 \u043a\u0442\u043e \u0443\u0433\u0430\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430 \u044f\u0437\u044b\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043d\u0430 \u043e\u0431\u043b\u043e\u0436\u043a\u0435 \u0441\u0442\u0430\u0442\u044c\u0438?<\/p>\n<p>  <\/p>\n<h2 id=\"ssylki\">\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/AigizK\/bashkort-parallel-corpora\" rel=\"nofollow noopener noreferrer\">\u0420\u0443\u0441\u0441\u043a\u043e-\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441<\/a><\/li>\n<li><a href=\"https:\/\/www.statmt.org\/wmt21\/unsup_and_very_low_res.html\" rel=\"nofollow noopener noreferrer\">\u0420\u0443\u0441\u0441\u043a\u043e-\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/averkij\/lingtrain-aligner\" rel=\"nofollow noopener noreferrer\">\u041a\u043e\u0434 lingtrain_aligner<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/averkij\/a-studio\" rel=\"nofollow noopener noreferrer\">\u041a\u043e\u0434 UI<\/a><\/li>\n<li><a href=\"http:\/\/t.me\/lingtrain_books\" rel=\"nofollow noopener noreferrer\">\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/a><\/li>\n<li><a href=\"https:\/\/colab.research.google.com\/drive\/1q19s_LD9hGSBrh_BR4RKX9UWq1S1ggDz\" rel=\"nofollow noopener noreferrer\">Colab \u0441 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/colab.research.google.com\/drive\/1D1Ru9PEWdqfSyoFX4gYl-xU_Kc3a_CJp\" rel=\"nofollow noopener noreferrer\">Colab \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u043f\u0443\u0441\u0430<\/a><\/li>\n<li><a href=\"https:\/\/www.tinkoff.ru\/collectmoney\/crowd\/averkiev.sergey7\/wYn8f32996\/\" rel=\"nofollow noopener noreferrer\">\u0424\u043e\u043d\u0434 \u043e\u0437\u0435\u043b\u0435\u043d\u0435\u043d\u0438\u044f \u041c\u0430\u0440\u0441\u0430<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/581272\/\"> https:\/\/habr.com\/ru\/articles\/581272\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mw\/va\/l8\/mwval8iyyt6sqatgboeg5i_878k.png\" data-src=\"https:\/\/habrastorage.org\/webt\/mw\/va\/l8\/mwval8iyyt6sqatgboeg5i_878k.png\"\/>  <\/p>\n<p><em>\u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u0431\u044b\u043b \u0433\u043e\u0434: \u043d\u0430\u043b\u043e\u0433\u0438, \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b, \u0431\u0430\u043d\u0434\u0438\u0442\u0438\u0437\u043c \u0438 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0421 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0431\u044b\u043b\u043e \u043d\u0435\u043b\u044c\u0437\u044f&#8230;<\/em><\/p>\n<p>  <\/p>\n<p><em>Upd. 04.12.2021 \u2014 <a href=\"https:\/\/t.me\/lingtrain_books\" rel=\"nofollow noopener noreferrer\">\u041d\u0430\u0448 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u043a\u0430\u043d\u0430\u043b<\/a><\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0440\u043e\u0434\u043e\u0432, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 270 \u044f\u0437\u044b\u043a\u0430\u0445. \u041e\u043a\u043e\u043b\u043e 150 \u044f\u0437\u044b\u043a\u043e\u0432 \u043d\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 1 \u0442\u044b\u0441\u044f\u0447\u0438 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u0439, \u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 20 \u043b\u0435\u0442 7 \u044f\u0437\u044b\u043a\u043e\u0432 \u0443\u0436\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u043e.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u043c\u043e\u0438 &#171;\u043f\u044f\u0442\u044c \u043a\u043e\u043f\u0435\u0435\u043a&#187; \u043f\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f. \u0415\u0433\u043e \u0446\u0435\u043b\u044c \u2014 \u043f\u043e\u043c\u043e\u0449\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430, \u043b\u0438\u043d\u0433\u0432\u0438\u0441\u0442\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043c, \u0440\u0430\u0434\u0435\u044e\u0449\u0438\u043c \u0437\u0430 \u0441\u0432\u043e\u0439 \u0440\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a. \u041f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u044b\u0432\u0430\u043d\u0438\u0435\u043c <strong>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u0432<\/strong>, \u2014 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e &#171;\u0442\u043e\u043f\u043b\u0438\u0432\u0430&#187;, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u0435\u0435 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u2014 <strong>\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439<\/strong> \u0438 <strong>\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439<\/strong>, \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u043d\u043e \u043e\u0431\u0449\u0430\u043b\u0441\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u043e\u0440\u043f\u0443\u0441 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432 \u0441\u0440\u0435\u0434\u0435 Colab&#8217;\u0430, \u0447\u0442\u043e\u0431\u044b \u043b\u044e\u0431\u043e\u0439 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0441\u043c\u043e\u0433 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"i-izvlekaem-parallelnyy-korpus\">I. \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u0443\u0441<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 python&#8217;\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>lingtrain_aligner<\/strong>. \u041a\u043e\u0434 \u0443 \u043d\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u044f\u0434 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0441\u0432\u043e\u0438. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f LaBSE. \u041e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c \u043d\u0430 109 \u044f\u0437\u044b\u043a\u0430\u0445. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u043e \u0434\u043b\u044f \u043d\u0438\u0445 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 (<em>\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u043c<\/em> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u0435\u043a\u0442\u043e\u0440 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442) \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"colab\">Colab<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043a\u043e\u0440\u043f\u0443\u0441 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1D1Ru9PEWdqfSyoFX4gYl-xU_Kc3a_CJp\" rel=\"nofollow noopener noreferrer\">\u044d\u0442\u043e\u043c Colab&#8217;e<\/a>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"ustanovka\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">pip install lingtrain_aligner<\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-395693","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=395693"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395693\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}