{"id":293651,"date":"2019-08-21T03:00:19","date_gmt":"2019-08-21T03:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293651"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293651","title":{"rendered":"\u041d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 hh.ru"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u2014 \u044d\u0442\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e. \u041a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043c\u044b \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435? \u0410 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435? \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0445\u043e\u0440\u043e\u0448\u0438. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c\u044e \u043f\u0430\u043b\u044c\u0446\u0430\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u043d\u0430\u0448\u0435\u043c \u043d\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f\u043c hh.ru, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0435 <a href=\"https:\/\/school.hh.ru\/\">\u0428\u043a\u043e\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432<\/a>.<br \/>  \u0423 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u044b\u043b \u0440\u044f\u0434 \u043f\u0440\u043e\u0431\u043b\u0435\u043c:   <\/p>\n<ul>\n<li>\u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f; <\/li>\n<li>\u043d\u0435 \u043c\u043e\u0433 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439;<\/li>\n<li>\u043d\u0435 \u0443\u043c\u0435\u043b \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0442\u043e\u043f;<\/li>\n<li>\u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438. <\/li>\n<\/ul>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/11\/zc\/yt\/11zcytnieti43oifzq4daeym1dy.jpeg\" width=\"70%\"><\/div>\n<p>  \u0412 \u043d\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 (\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u043e\u0432\u044b\u0435).<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h4>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a, \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c top-N \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u0447\u043d\u043e\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432 (\u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e). \u042d\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043e\u043d \u043f\u0440\u043e\u0441\u0442 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0438 \u043d\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0414\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0448 \u0441\u0430\u0434\u0436\u0435\u0441\u0442 \u0442\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u2014 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0432\u044b\u0434\u0430\u0447\u0438.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u043f\u043e\u043f\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u00abjavascript \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u00bb, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u00abjavascript \u0440\u0430\u0437\u00bb \u043d\u0430\u043c \u043d\u0435\u0447\u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043b\u0438\u0448\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u00abjavascript \u0440\u0430\u0437\u043d\u043e\u0440\u0430\u0431\u043e\u0447\u0438\u0439\u00bb. \u041f\u043e \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043b\u043e\u0432 \u043f\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430.<\/p>\n<h4> \u042f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h4>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u043b\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/946\/cc5\/a4d\/946cc5a4daa93d25eec5899779eb3fd3.png\" alt=\"word_count\"><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435, \u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438\u0441\u044c n-\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9f7\/3d5\/7a1\/9f73d57a1210fbd07648ca7599e86574.svg\" alt=\"$P(w_1\\dots w_m)=\\prod_{i=1}^mP(w_i|w_1\\dots w_{i-1})\\approx\\prod_{i=1}^mP(w_i|w_{i-(n-1)}\\dots w_{i-1})$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438, \u0442\u043e\u0433\u0434\u0430<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/72c\/1c2\/627\/72c1c2627e57607eb3b3a29df677ac93.svg\" alt=\"$P(w_i|w_1\\dots w_{i-1})=\\frac{count(w_1\\dots w_i)}{count(w_1\\dots w_{i-1})}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435: \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0438 &#8216;junior developer java&#8217;, \u0442\u043e \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cf4\/9f6\/013\/cf49f60133c88b269ea65f00d263dc6f.svg\" alt=\"$P(\\text{junior developer java})=\\frac{count(\\text{junior developer java})}{count(\\text{junior developer})}=0$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Backoff:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/21b\/dff\/943\/21bdff943c725e3a9b4a0a106a425ffe.svg\" alt=\"$P_{bo}(w_n|w_1\\dots w_{n-1}) = \\begin{cases} {P}(w_n|w_1\\dots w_{n-1}), count(w_1\\dots w_{n-1})&gt;0 \\\\ \\alpha{P_{bo}}(w_n|w_2\\dots w_{n-1}), count(w_1\\dots w_{n-1})=0 \\end{cases} $\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/06d\/fca\/ca6\/06dfcaca63e33ebec376d537477e91f4.svg\" alt=\"$\\alpha = \\frac{P(w_1\\dots w_{n-1})}{1 - \\sum_wP_{bo}(w|w_2\\dots w_{n-1})}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0413\u0434\u0435 P \u2014 \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e5d\/23f\/2b6\/e5d23f2b614d98605539184cc38e648f.svg\" alt=\"$w_1...w_{n-1}$\" data-tex=\"inline\"><\/math> (\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u041b\u0430\u043f\u043b\u0430\u0441\u0430):  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/870\/2d1\/b4f\/8702d1b4f79f7e5c8b20be3b81cd9766.svg\" alt=\"$P(w_n | w_1\\dots w_{n-1}) = \\frac{count(w_n) + \\delta}{count(w_1\\dots w_{n-1})+\\delta |V|}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0433\u0434\u0435 V \u2014 \u043d\u0430\u0448 \u0441\u043b\u043e\u0432\u0430\u0440\u044c. <\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0443\u043c\u0435\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u043e \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b? \u0420\u0430\u0437\u0443\u043c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u043f\u0443\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f24\/867\/821\/f2486782153bf280914fcc599934746c.svg\" alt=\"$w_1...w_n$\" data-tex=\"inline\"><\/math>, \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043d\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u044f  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/374\/a7c\/73a\/374a7c73a466ec3174ed471dad1ae503.svg\" alt=\"$w_1\\dots w_m = \\underset{w_{n+1}\\dots w_m \\in V}{argmax}P(w_1\\dots w_n w_{n+1} \\dots w_m)$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/844\/194\/97e\/84419497eb1ca7a5c58bf7154ac8bc13.svg\" alt=\"$|V| ^ {m-n}, m=1 \\dots M$\" data-tex=\"inline\"><\/math> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u043e\u0442\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043b\u0443\u0447\u0448\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Beam_search\">Beam Search<\/a>. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0439 n-\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043d \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:  <\/p>\n<pre><code class=\"python\">def beam(initial, vocabulary):     variants = [initial]     for i in range(P):         candidates = []         for variant in variants:             candidates.extends(generate_candidates(variant, vocabulary))         variants = sorted(candidates)[:N]     return candidates   def generate_candidates(variant, vocabulary):     top_terms = []     # \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u0442\u0435\u0440\u043c\u044b \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438\u0437 1, 2, ... n \u0442\u0435\u0440\u043c\u043e\u0432     for n0 in range(n):         top_n = sorted(vocabulary, key=lambda c: P(\u0441|variant[-n0:])         top_terms.extends(top_n)     candidates = [variant + [term] for term in top_terms]     # \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     candidates = sorted(candidates, key=lambda v: P(variant))[:N]     return candidates <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7v\/-5\/se\/7v-5set6vngiwemvsgiw1qcgf-o.jpeg\" alt=\"beam search\"><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0443\u0437\u043b\u044b, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0435\u043b\u0435\u043d\u044b\u043c, \u2014 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0447\u0438\u0441\u043b\u043e \u043f\u0435\u0440\u0435\u0434 \u0443\u0437\u043b\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4c2\/af2\/614\/4c2af26149e1f8804b95ce0cac2b74b0.svg\" alt=\"$w_n$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/45d\/d0a\/c84\/45dd0ac84783dcc51f7e9dd76cbc67f7.svg\" alt=\"$P(w_n|w_{n-1})$\" data-tex=\"inline\"><\/math>, \u043f\u043e\u0441\u043b\u0435 \u0443\u0437\u043b\u0430 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4f9\/279\/703\/4f927970377739da2f97bc2d3faa1047.svg\" alt=\"$P(w1 ... w_n)$\" data-tex=\"inline\"><\/math>.<br \/>  \u0421\u0442\u0430\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0432 generate_candidates \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c N \u043b\u0443\u0447\u0448\u0438\u0445 \u0442\u0435\u0440\u043c\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 n-\u0433\u0440\u0430\u043c\u043c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0444\u0440\u0430\u0437, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0445 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0442\u0430\u043a\u043e\u0435 \u043d\u0435 \u0432\u0437\u043b\u0435\u0442\u0438\u0442.<\/p>\n<h4>\u0411\u043e\u0440 \u0434\u043b\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439<\/h4>\n<p>  \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f N \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0439 \u0444\u0440\u0430\u0437\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u043e\u0440 \u043d\u0430 \u0442\u0435\u0440\u043c\u0430\u0445. \u0412 \u0443\u0437\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/506\/606\/7da\/5066067dafc5ddc92204e678f2a11f67.svg\" alt=\"$w_1 \\to w_2$\" data-tex=\"inline\"><\/math> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/4a5\/2ba\/7234a52ba041cdb09b9328a047048fb2.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"><\/math>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5e8\/e37\/e63\/5e8e37e63c2c3fea324810ebbfc5a7ac.svg\" alt=\"$P(w_2|w_1)$\" data-tex=\"inline\"><\/math> \u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a58\/e92\/14c\/a58e9214c684770d0a1acfa8a19350e9.svg\" alt=\"$P(\\bullet|w_1 w_2)$\" data-tex=\"inline\"><\/math> \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0440\u043c\u043e\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ea0\/410\/a41\/ea0410a416409ab7cc4fec173e074603.svg\" alt=\"$w_3$\" data-tex=\"inline\"><\/math> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f1f\/da7\/e06\/f1fda7e0697ebbec40b718df6579d708.svg\" alt=\"$P(w_3|w_1 w_2)$\" data-tex=\"inline\"><\/math>. \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0440\u043c <i>eos<\/i> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u043e\u043d\u0435\u0446 \u0444\u0440\u0430\u0437\u044b.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-6\/de\/r-\/-6der-pncjynlfrcjo0sxolezha.jpeg\" alt=\"trie\"><\/p>\n<h4>\u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441<\/h4>\n<p>  \u0412 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u043c\u044b \u0438\u0441\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u044b. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043d\u0435 \u0432\u0435\u0440\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441. \u041d\u0430\u043c \u0441\u043d\u043e\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0432\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u043b\u043e\u0432\u043e. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0431\u043e\u0440, \u0432 \u0443\u0437\u043b\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043c M \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0443\u043d\u0438\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u0440\u043c\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0430\u0448 \u0431\u043e\u0440 \u0434\u043b\u044f java, junior, jupyter, javascript \u043f\u0440\u0438 M=3:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sl\/ce\/mo\/slcemo62kuxtxtuhlh4cm6ty3lu.jpeg\" alt=\"trie\"><\/p>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c Beam Search, \u043d\u0430\u0445\u043e\u0434\u0438\u043c M \u043b\u0443\u0447\u0448\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4c2\/af2\/614\/4c2af26149e1f8804b95ce0cac2b74b0.svg\" alt=\"$w_n$\" data-tex=\"inline\"><\/math> \u0438 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u043c N \u043b\u0443\u0447\u0448\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fac\/9b0\/bee\/fac9b0beecea579a406b566d9b6997c5.svg\" alt=\"$P(w_1 \\dots w_n)$\" data-tex=\"inline\"><\/math>. <\/p>\n<h4>\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438<\/h4>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041c\u044b \u0434\u0430\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u0441\u043b\u043e\u0432. \u0418 \u0432\u0441\u0435 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e\u2026 <b>\u041d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0442\u0435\u043b\u0438 \u043e\u043f\u0435\u0447\u0442\u044b\u0432\u0430\u0442\u0441\u044f \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0442 hfcrkflre \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b.<\/b><br \/>  \u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442\u044c? \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430 \u0443\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f\/\u0437\u0430\u043c\u0435\u043d\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0440\u0443\u0433\u043e\u0439. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u044b. \u0422\u0430\u043a, \u0434\u043b\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u00ab\u0441\u0430\u043f\u0440\u0449\u0438\u043a\u00bb, \u043f\u043e\u043b\u0443\u0447\u0438\u043c, \u0447\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u00ab\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u00bb \u0438 \u00ab\u0441\u0432\u0430\u0440\u0449\u0438\u043a\u00bb \u0440\u0430\u0432\u043d\u043e\u0446\u0435\u043d\u043d\u044b, \u0445\u043e\u0442\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u0435\u043b\u0438 \u0432 \u0432\u0438\u0434\u0443 \u0432\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u043e\u0432\u043e.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043c\u044b \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u00ab\u0441\u0430\u043f\u0440\u0449\u0438\u043a \u0437\u0430\u043a\u0430\u0437\u043e\u0432\u00bb \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u00ab\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u00bb, \u0430 \u043d\u0435 \u00ab\u0441\u0432\u0430\u0440\u0449\u0438\u043a\u00bb. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u043a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Noisy_channel_model\">\u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430<\/a>:  <\/p>\n<ol>\n<li>\u0437\u0430\u0434\u0430\u043d \u0430\u043b\u0444\u0430\u0432\u0438\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/885\/292\/cd7\/885292cd7b9ccfacd4aa4d5252708efa.svg\" alt=\"$\\Sigma$\" data-tex=\"inline\"><\/math>;<\/li>\n<li>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/488\/a52\/d63\/488a52d6350f501f2cce18096e7b74d2.svg\" alt=\"$\\Sigma^*$\" data-tex=\"inline\"><\/math> \u043d\u0430\u0434 \u043d\u0438\u043c;<\/li>\n<li>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/845\/31f\/13f\/84531f13fbe2ce3a538cb282adea7eb1.svg\" alt=\"$D \\subseteq \\Sigma^*$\" data-tex=\"inline\"><\/math>;<\/li>\n<li>\u0437\u0430\u0434\u0430\u043d\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2b4\/67c\/0f6\/2b467c0f622bfb9f901d7ddbfc47f309.svg\" alt=\"$s \\in \\Sigma^*, w \\in D$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ol>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 w \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 s. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a, \u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c3d\/2f2\/c44\/c3d2f2c44fc42edea27de7f8f67b4829.svg\" alt=\"$P$\" data-tex=\"inline\"><\/math> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a (\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u043c\u0438 \u0437\u0430\u043c\u0435\u043d\u0430\u043c\u0438) <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/59d\/f74\/c6c\/59df74c6cad9b35529dac925e1ce8485.svg\" alt=\"$P_e(t|r)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 t, r \u2014 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 n-\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math> \u043a\u0430\u043a \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c s \u0438\u0437 w \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u043c\u0438 \u0437\u0430\u043c\u0435\u043d\u0430\u043c\u0438. <br \/>  \u041f\u0443\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff5\/d70\/101\/ff5d70101df3d8aed4d4c6ba07974e05.svg\" alt=\"$Part_n(x)$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 x \u043d\u0430 n \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u0445). \u041c\u043e\u0434\u0435\u043b\u044c \u0411\u0440\u0438\u043b\u043b\u0430-\u041c\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a82\/1c5\/3f6\/a821c53f658bf1cbe69fde0b96ca099f.svg\" alt=\"$P(s|w) \\approx \\max_{R\\in Part_n(w),T\\in Part_n(s)} \\prod_{i=1}^{n} P_e(T_i | R_i)$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b64\/06d\/0df\/b6406d0dfb7816e23fd6e237ee2bdafc.svg\" alt=\"$P(w|s)$\" data-tex=\"inline\"><\/math>:<\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/32e\/55c\/263\/32e55c263b1c42ce7cce2c55be9139b2.svg\" alt=\"$P(w|s) = \\frac{P(s|w)P(w)}{P(s)} = const \\cdot P(s|w)\\cdot P(w)$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u0430\u0443\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c P(w|s), \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 \u0438 \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438. <\/p>\n<h4>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/74e\/746\/f1f\/74e746f1f6185e398f6c5c6f60014cfa.svg\" alt=\"$P_e(T_i | R_i)$\" data-tex=\"inline\"><\/math><\/h4>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u043d \u043d\u0430\u043c \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u044b \u0441\u043b\u043e\u0432 (s, w) \u043a\u043e\u0442\u043e\u0440\u044b\u0435   <\/p>\n<ol>\n<li>\u0431\u043b\u0438\u0437\u043a\u0438 \u043f\u043e \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0443;<\/li>\n<li>\u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u043b\u043e\u0432 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 N \u0440\u0430\u0437.<\/li>\n<\/ol>\n<p>  \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0430\u0440 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0443:<\/p>\n<p><math>$$display$$\\begin{array} {|r|r|}\\hline \u043f &amp; \u0440 &amp; \u043e &amp; \u0433 &amp; \u0440 &amp; \u0430 &amp; \u043c &amp; \u043c &amp; \u0438 &amp; \u0441 &amp; \u0442 \\\\ \\hline \u0440 &amp; \u043f &amp; \u043e &amp; \u0433 &amp; \u0440 &amp; \u0430 &amp; &amp; \u043c &amp; \u0438 &amp; \u0441 &amp; \u0442 \\\\ \\hline \\end{array}$$display$$<\/math><\/p>\n<p>  \u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f s \u0438 w (\u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438\u0441\u044c \u0434\u043b\u0438\u043d\u0430\u043c\u0438 n=2, 3): \u043f\u2192\u043f, \u043f\u0440 \u2192 \u0440\u043f, \u043f\u0440\u043e \u2192\u0440\u043f\u043e, \u0440\u043e\u2192\u043f\u043e, \u043c \u2192 &#187;, \u043c\u043c \u2192 \u043c \u0438 \u0442.\u0434. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 n-\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u0439\u0434\u0435\u043c <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/69a\/5f7\/f7d\/69a5f7f7ddcff8645c0ba379ceb1e99e.svg\" alt=\"$P_e(t|r) = \\frac{count(r\\to t)}{count(r)}$\" data-tex=\"display\"><\/math><\/p>\n<h4>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math><\/h4>\n<p>  \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e3f\/307\/36a\/e3f30736a1f2d4a925ff556200cb5411.svg\" alt=\"$O(2^{|w|+|s|})$\" data-tex=\"inline\"><\/math>: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f w \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u043c\u0438 s. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u043e\u0439 \u043d\u0430 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8eb\/31f\/765\/8eb31f765debd2d34c37722b1649971c.svg\" alt=\"$O(|w| * |s| * n^2)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 n \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u043d:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/baa\/5eb\/f94\/baa5ebf94f11d8755da2b4bbe2f14049.svg\" alt=\"$d[i,j]=\\begin{cases} d[0,j] = 0 &amp; j &gt;= k\\\\ d[i,0] = 0 &amp; i &gt;= k\\\\ d[0,j] = P(s[0:j]\\space |\\space w[0]) &amp; j &lt; k\\\\ d[i,0] = P(s[0]\\space |\\space w[0:i]) &amp; i &lt; k\\\\ d[i,j] = \\underset{k, l \\le n, k\\lt i, l \\lt j}{max}(P(s[j-l:j]\\space | \\space w[i-k:i])\\cdot d[i-k-1,j-l-1]) \\end{cases}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c P \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 k-\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0412\u0430\u0433\u043d\u0435\u0440\u0430-\u0424\u0438\u0448\u0435\u0440\u0430 \u0441 \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0423\u043a\u043a\u043e\u043d\u0435\u043d\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/90b\/5dc\/dd2\/90b5dcdd271fada2aff48df1db57956a.svg\" alt=\"$P(w[0:i] | s[0:j])$\" data-tex=\"inline\"><\/math> \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4e2\/8fe\/e7e\/4e28fee7e1e53314b21e7f280c9c5ff4.svg\" alt=\"$w[i-k:i]$\" data-tex=\"inline\"><\/math> \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c6f\/5c5\/4c5\/c6f5c54c5b9fffa7a945658d3f05c271.svg\" alt=\"$s[j-l : j]$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/73d\/7b0\/6fb\/73d7b06fb99fb350f7e9323ca1b79426.svg\" alt=\"$k, l \\le n$\" data-tex=\"inline\"><\/math> \u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0433\u043e.<\/p>\n<h4>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b64\/06d\/0df\/b6406d0dfb7816e23fd6e237ee2bdafc.svg\" alt=\"$P(w|s)$\" data-tex=\"inline\"><\/math><\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0443\u043c\u0435\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s|w)$\" data-tex=\"inline\"><\/math>. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 w, \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b64\/06d\/0df\/b6406d0dfb7816e23fd6e237ee2bdafc.svg\" alt=\"$P(w|s)$\" data-tex=\"inline\"><\/math>. \u0422\u043e\u0447\u043d\u0435\u0435, \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/24f\/0ba\/a2d\/24f0baa2def173244e82cd5de34bae57.svg\" alt=\"$s_1s_2 \\dots s_n$\" data-tex=\"inline\"><\/math> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8f8\/e29\/0d3\/8f8e290d3bbda170b9bcaa3664250c9c.svg\" alt=\"$w_1 \\dots w_n$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9bc\/557\/3c3\/9bc5573c39a79d18ce05e78e91e966b1.svg\" alt=\"$P(w_1 \\dots w_n|s_1 \\dots s_n)$\" data-tex=\"inline\"><\/math> \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0447\u0435\u0441\u0442\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0435 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0441\u044f \u0432 \u043d\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u043a\u043b\u0438\u043a\u0430 (\u0430 \u0441\u0440\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b \u043a \u043a\u043e\u043d\u0446\u0443), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435:  <\/p>\n<ol>\n<li>\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438\u0437\u043c\u0435\u043d\u044f\u044f k \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0441\u043b\u043e\u0432:<br \/> \n<ol>\n<li>\u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0435\u0441\u043b\u0438 \u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0442\u0435\u0440\u043c\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432\u044b\u0448\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e;<\/li>\n<li>\u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u043e\u0432\u0430, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 d;<\/li>\n<li>\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0437 \u043d\u0438\u0445 top-N \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a9\/9f5\/fe1\/5a99f5fe1500544625b211f68c1728c1.svg\" alt=\"$P(s | w)$\" data-tex=\"inline\"><\/math>;<\/li>\n<\/ol>\n<\/li>\n<li>\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 BeamSearch \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c;<\/li>\n<li>\u043f\u0440\u0438 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u0438\u0441\u043a\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/862\/ce3\/617\/862ce3617c27408ba2fb4e8e91ed3adb.svg\" alt=\"$\\prod_{i=0}^{k-1} P(s_{n-i}|w_{n-i})$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ol>\n<p>  \u0414\u043b\u044f \u043f.1.2 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c FB-Trie (forward and backward trie), \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043d\u0435\u0447\u0435\u0442\u043a\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u043c\u0443 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u043e\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u0443. \u042d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c P(s|w) \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044e.<\/p>\n<h4>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h4>\n<p>  \u0421 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0440\u0430\u0437\u044b, \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439), \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 n-\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0441\u0442\u0440\u043e\u0438\u043c \u0431\u043e\u0440\u044b. \u0421\u043b\u043e\u0436\u043d\u0435\u0435 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043e\u0448\u0438\u0431\u043e\u043a: \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0434\u043b\u044f \u0435\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u043f\u0430\u0440 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0431\u043b\u0438\u0437\u043a\u0438 \u043f\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0414\u0430\u043c\u0435\u0440\u0430\u0443-\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430, \u0438 \u043e\u0434\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0430\u0449\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437.<br \/>  \u041d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0448\u0443\u043c\u043d\u044b\u0435: \u043f\u043e\u043f\u044b\u0442\u043a\u0438 xss-\u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439, \u043d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043e\u0431\u043c\u0435\u043d\u0430, \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u00ab\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 c not 1c\u00bb, <s>\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u043f\u043e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u043a\u043e\u0442\u0430<\/s>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443?<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nq\/nh\/do\/nqnhdo5juojmi_ldbcp6swt21qu.png\">  <\/div>\n<\/div>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u043b\u0438:  <\/p>\n<ul>\n<li>\u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0442\u0435\u0440\u043c\u044b;<\/li>\n<li>\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432;<\/li>\n<li>\u043e\u0431\u0441\u0446\u0435\u043d\u043d\u0443\u044e \u043b\u0435\u043a\u0441\u0438\u043a\u0443.<\/li>\n<\/ul>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0441\u0432\u0435\u0440\u044f\u043b\u0438\u0441\u044c \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043b\u0438\u0431\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0442\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f, \u043b\u0438\u0431\u043e \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<h4>\u0412 \u043f\u0440\u043e\u0434<\/h4>\n<p>  \u041f\u0440\u044f\u043c\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u2014 \u043d\u0430 20% \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0412 hh.ru \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/habr.com\/ru\/company\/hh\/blog\/321386\">\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0410\u0411-\u0442\u0435\u0441\u0442\u043e\u0432<\/a>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0432 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0438 <a href=\"https:\/\/youtu.be\/V_KmTqIxJXU?t=1162\">\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438<\/a>.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ok\/kb\/rh\/okkbrhzzsby1whnncfzpbfn4dz8.jpeg\" alt=\"metric\"><\/p>\n<p>  \u041f\u0440\u043e\u043a\u0440\u0430\u0441\u0438\u043b\u0430\u0441\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0438\u0437 \u0441\u0430\u0434\u0436\u0435\u0441\u0442\u0430 \u043d\u0430 \u0441\u043e\u0438\u0441\u043a\u0430\u0442\u0435\u043b\u0435\u0439 (\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e\u0441\u044c \u0441 0.959 \u0434\u043e 1.1355), \u0430 \u0434\u043e\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0438\u0437 \u0441\u0430\u0434\u0436\u0435\u0441\u0442\u0430 \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u0441 12.78% \u0434\u043e 15.04%. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0435 \u0432\u044b\u0440\u043e\u0441\u043b\u0438, \u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u0447\u0430\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u043c\u0438.<\/p>\n<h4>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a<\/h4>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u0428\u043a\u043e\u043b\u044b, \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445, \u043e\u0431 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0438 \u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0445, \u0433\u0434\u0435 \u0440\u0435\u0448\u0430\u043b\u0438, \u043a\u0430\u043a\u0438\u0435 \u0444\u0438\u0447\u0438 \u0432\u0437\u044f\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043f\u0435\u0442\u044c \u043a \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u0435\u043c\u043e. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/www.youtube.com\/playlist?list=PLGn25JCaSSFQQOab_xMXI3vJ0tDUkFaCI\">\u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0439 \u0448\u043a\u043e\u043b\u044b<\/a>, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/school.hh.ru\">https:\/\/school.hh.ru<\/a>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u0443\u0447\u0438\u0442\u044c\u0441\u044f. \u041a\u0441\u0442\u0430\u0442\u0438, \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0430\u0434\u0430\u0447 \u0442\u0430\u043a\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u043d\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430.<\/p>\n<h4>\u0427\u0442\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c?<\/h4>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/medium.com\/syncedreview\/language-model-a-survey-of-the-state-of-the-art-technology-64d1a2e5a466\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Language Model<\/a><\/li>\n<li><a href=\"https:\/\/www.cis.uni-muenchen.de\/people\/Schulz\/Pub\/aspaperCISreport.pdf\">\u041c\u043e\u0434\u0435\u043b\u044c \u0411\u0440\u0438\u043b\u043b\u0430-\u041c\u0443\u0440\u0430<\/a><\/li>\n<li><a href=\"https:\/\/www.aclweb.org\/anthology\/P00-1037\">FB-Trie<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/hh\/blog\/413261\">\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0435<\/a><\/li>\n<\/ol>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/company\/hh\/blog\/464415\/\"> https:\/\/habr.com\/ru\/company\/hh\/blog\/464415\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u2014 \u044d\u0442\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e. \u041a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043c\u044b \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435? \u0410 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435? \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0445\u043e\u0440\u043e\u0448\u0438. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c\u044e \u043f\u0430\u043b\u044c\u0446\u0430\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u043d\u0430\u0448\u0435\u043c \u043d\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f\u043c hh.ru, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0432\u044b\u043f\u0443\u0441\u043a\u0435 <a href=\"https:\/\/school.hh.ru\/\">\u0428\u043a\u043e\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432<\/a>.<br \/>  \u0423 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u044b\u043b \u0440\u044f\u0434 \u043f\u0440\u043e\u0431\u043b\u0435\u043c:   <\/p>\n<ul>\n<li>\u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f; <\/li>\n<li>\u043d\u0435 \u043c\u043e\u0433 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439;<\/li>\n<li>\u043d\u0435 \u0443\u043c\u0435\u043b \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0442\u043e\u043f;<\/li>\n<li>\u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438. <\/li>\n<\/ul>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/11\/zc\/yt\/11zcytnieti43oifzq4daeym1dy.jpeg\" width=\"70%\"><\/div>\n<p>  \u0412 \u043d\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 (\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u043e\u0432\u044b\u0435).  <\/p>\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-293651","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293651","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=293651"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293651\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}