{"id":346792,"date":"2023-03-15T21:00:50","date_gmt":"2023-03-15T21:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346792"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-03-15T21:00:50","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346792","title":{"rendered":"<span>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043d\u0430 Python \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/706224\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u00ab\u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d\u0430 \u041a\u043e\u043b\u0435\u0446\u00bb, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 (\u0441\u043b\u043e\u0432\u0430\/\u0441\u043b\u043e\u0432\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f) \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043b\u0430\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u0435 \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u043e\u043a\u043e\u044f, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1e5\/2cc\/467\/1e52cc4673808b40f37a85910fee7517.PNG\" alt=\"\u041b\u044e\u0431\u0438\u043c\u0430\u044f \u043a\u043d\u0438\u0433\u0430, \u0441\u043d\u044f\u0442\u0430\u044f \u043d\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\" title=\"\u041b\u044e\u0431\u0438\u043c\u0430\u044f \u043a\u043d\u0438\u0433\u0430, \u0441\u043d\u044f\u0442\u0430\u044f \u043d\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\" width=\"1016\" height=\"677\"\/><\/p>\n<div><figcaption>\u041b\u044e\u0431\u0438\u043c\u0430\u044f \u043a\u043d\u0438\u0433\u0430, \u0441\u043d\u044f\u0442\u0430\u044f \u043d\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 MVP \u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u043b\u0430 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0435 (\\b{term}, \u0433\u0434\u0435 \\b \u2013 \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043b\u043e\u0432\u0430), \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u043b\u0438 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0444\u043b\u0435\u043a\u0441\u0438\u044f\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, -s, -ed, -ing). \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0434\u0436\u043e\u043a\u0435\u0440\u043e\u043c \u043d\u0430 \u043a\u043e\u043d\u0446\u0435. \u041d\u043e \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0432\u0435\u0441\u043e\u043c\u0443\u044e \u0434\u043e\u043b\u044e \u043c\u043e\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0430\u0440\u044b \u0431\u0435\u0437\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Elasticsearch \u044f, \u043a\u0430\u043a \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u0438 \u0432\u0435\u0447\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f, \u0440\u0435\u0448\u0438\u043b\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. \u0421\u043a\u0443\u0434\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043c\u0435\u043d\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0433\u0430\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043d\u0430 \u0432\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043c\u043e\u0433\u0443\u0447\u0435\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0447\u0430\u0441\u0442\u044c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0443\u0436\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u043d \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u041d\u0443 \u043a\u0430\u043a \u0434\u0430\u043d \u2013 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0440\u0443\u043a\u0430\u043c\u0438 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0443\u043f\u043e\u0440\u043d\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430. \u0414\u0430\u043d \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/706224\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0441 \u0432\u0434\u0432\u043e\u0435 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u043e\u043c (\u00ab\u0411\u0440\u0430\u0442\u0441\u0442\u0432\u043e \u041a\u043e\u043b\u044c\u0446\u0430\u00bb). \u0412 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 11.690 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u00ab\u0442\u0435\u0440\u043c \u2013 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u2013 \u043d\u043e\u043c\u0435\u0440 \u0433\u043b\u0430\u0432\u044b\u00bb. \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 Excel.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437, \u044f \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u0432\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u043c \u0433\u043d\u0435\u0437\u0434\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 pivot_table() \u0438\u0437 pandas. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c 5.404 \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f &#8212; 5.354.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u043d\u044f \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u0435, \u0430 \u0432 \u0440\u043e\u043c\u0430\u043d\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u0432\u0438\u0434\u0443 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043b\u0430\u0443\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, run \u2013 ran \u2013 run) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432 \u043f\u043e \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u042f \u0441\u043a\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432. \u041e\u043d \u043d\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b 294 \u0448\u0442\u0443\u043a\u0438, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0447\u0438: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, cloven (p.p. \u043e\u0442 cleave) \u0432\u043c\u0435\u0441\u0442\u043e cleft (\u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435). \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b \u0443 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, burn), \u0430 leap \u0434\u0430\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 &#8212; leaped \u0438 leapt.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0430 \u0438\u0445 \u0441\u043f\u0438\u0441\u043e\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c09\/8e8\/3d0\/c098e83d0ee76160064871669bccab44.png\" alt=\"\u0418 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432\" title=\"\u0418 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432\" width=\"249\" height=\"182\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c09\/8e8\/3d0\/c098e83d0ee76160064871669bccab44.png\"\/><\/p>\n<div><figcaption>\u0418 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 read_csv(), \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0431\u0435\u043b\u044b:<\/p>\n<pre><code class=\"python\">import pandas as pd verb_data = pd.read_csv(pathlib.Path('c:\/', 'ALL', 'LotR', '\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b.txt'),                        sep=\" \", header=None, names=[\"Inf\", \"Past\", \"PastParticiple\"], index_col=0)<\/code><\/pre>\n<p>\u042f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u043c index_col, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u044b \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c:<\/p>\n<pre><code class=\"python\">excel_data = pd.read_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'), dtype = str) df = pd.DataFrame(excel_data, columns=['Word', 'Russian', 'Chapters'])<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0435\u043c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0430\u0433\u043e\u043b\u0430 \u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u044b. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435.   <\/p>\n<pre><code class=\"python\">def check_irrverbs(word):     global verb_data      # \u0431\u0435\u0440\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430     arr = word.split(' ')     w, *tail = arr # = arr[0], arr[1:]     # \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0445\u0432\u043e\u0441\u0442     tail = \" \".join(tail)      # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c     if w in verb_data.index:         # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0444\u043e\u0440\u043c\u044b Past \u0438 Past Participle         # \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u043e\u0440\u043c\u0443         if verb_data.loc[w][\"Past\"] == verb_data.loc[w][\"PastParticiple\"]:             return verb_data.loc[w][\"Past\"] + \" \" + tail         return \", \".join([v + \" \" + tail for v in verb_data.loc[w].tolist()])      return \"\"<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f make up one&#8217;s mind \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 made up one&#8217;s mind.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0443, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0438 \u0437\u0430\u0442\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043d\u043e\u0432\u044b\u0439 Excel-\u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"python\">df['IrrVerb'] = df['Word'].apply(check_irrverbs) df.to_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'))<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 Excel-\u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 2-\u044e (Past) \u0438 3-\u044e (Past Participle) \u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u0443\u0441\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3e9\/95f\/98e\/3e995f98e22304036a8329559367b050.png\" alt=\"\u0421\u043b\u043e\u0432\u0430\u0440\u044c + \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b\" title=\"\u0421\u043b\u043e\u0432\u0430\u0440\u044c + \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b\" width=\"624\" height=\"202\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e9\/95f\/98e\/3e995f98e22304036a8329559367b050.png\"\/><\/p>\n<div><figcaption>\u0421\u043b\u043e\u0432\u0430\u0440\u044c + \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435\u0433\u043e \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c 662.<\/p>\n<h2>\u0421\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0444\u043e\u0440\u043c\u044b \u0438 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445, \u0438 \u0434\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432.<\/p>\n<pre><code class=\"python\">def generate_verbs(word, is_irrverb):     forms = []      # \u0432\u0437\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430     verb, tail = word, \"\"     pos = word.find(\" \")     if pos >= 0:         verb = word[:pos]         tail = word[pos:]      consonant = \"bcdfghjklmnpqrstvwxz\"     last = verb[-1]      # \u0433\u043b\u0430\u0433\u043e\u043b \u0432\u043e 2 \u0438 3 \u0444\u043e\u0440\u043c\u0430\u0445     if not is_irrverb:         if last in consonant:             forms.append(verb + last + \"ed\" + tail) # stop -> stopped             forms.append(verb + \"ed\" + tail) # \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u0435\u0437 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f         elif last == \"y\":             if verb[-2] in consonant:                 forms.append(verb[:-1] + \"ied\" + tail) # carry -> carried             else:                 forms.append(verb + \"ed\" + tail) # play -> played         elif last == \"e\":             forms.append(verb + \"d\" + tail) # arrive -> arrived         else:             forms.append(verb + \"ed\" + tail)      # \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u0439, \u043e\u043d \u0436\u0435 ing-\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0433\u043b\u0430\u0433\u043e\u043b\u0430     if verb[-2:] == \"ie\":         forms.append(verb[:-2] + \"ying\" + tail) # lie -> lying     elif last == \"e\":         forms.append(verb[:-1] + \"ing\" + tail) # write -> writing     elif last in consonant:         forms.append(verb + last + \"ing\" + tail) # sit -> sitting         forms.append(verb + \"ing\" + tail) # sit -> sitting     else:         forms.append(verb + \"ing\" + tail)      return forms<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435, \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043b\u0438\u0431\u043e \u0432\u0441\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430 \u043a\u0430\u043a\u0443\u044e \u0431\u0443\u043a\u0432\u0443 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f last) \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043b\u0438\u0431\u043e \u0433\u043b\u0430\u0441\u043d\u044b\u0445, \u043b\u0438\u0431\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u0445. \u0421\u043f\u0438\u0441\u043e\u043a \u0433\u043b\u0430\u0441\u043d\u044b\u0445 \u0431\u044b\u043b \u0431\u044b \u043a\u043e\u0440\u043e\u0447\u0435, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0442\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a consonant.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u0432\u0442\u043e\u0440\u0430\u044f \u0438 \u0442\u0440\u0435\u0442\u044c\u044f \u0444\u043e\u0440\u043c\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0435\u043a\u0441\u0438\u0439 -d, -ed, -ied \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0432\u0443\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u0438 \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. \u0414\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043e\u0431\u0435 \u0444\u043e\u0440\u043c\u044b \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446.<\/p>\n<p>\u0413\u0435\u0440\u0443\u043d\u0434\u0438\u0439 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u043d\u043e \u043e\u043f\u044f\u0442\u044c-\u0442\u0430\u043a\u0438 \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0438 \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u043e\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p>\u0412\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a forms, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0447\u0430\u0441\u0442\u044f\u0445 \u0440\u0435\u0447\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430, \u0434\u0430 \u044d\u0442\u043e \u0438 \u043c\u0430\u043b\u043e\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u0432\u0438\u0434\u0443 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u2013 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0441\u043b\u043e\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0438 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443. \u041c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b. \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435, \u0442\u043e \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e. <\/p>\n<h2>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/h2>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0438\u0434 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, &#8212; \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f: \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 one\u2019s, \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e\u0435 oneself \u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 somebody \u0438 something. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u2013 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f (my, your, his \u0438 \u0442.\u0434.), \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f (myself, yourself, himself \u0438 \u0442.\u0434.) \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 one\u2019s \u0438 oneself:<\/p>\n<pre><code class=\"python\">def replace_possessive_reflexive(word):     possessive = [\"my\", \"mine\", \"your\", \"yours\", \"his\", \"her\", \"hers\", \"its\", \"our\", \"ours\", \"their\", \"theirs\"]     reflexive = [\"myself\", \"yourself\", \"himself\", \"herself\", \"itself\", \"ourselves\", \"yourselves\", \"themselves\"]      # \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c one's \u043d\u0430 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 possessive     if \"one's\" in word:         forms = list(map(lambda p: word.replace(\"one's\", p), possessive))     elif \"oneself\" in word:         # \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c oneself \u043d\u0430 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 reflexive         forms = list(map(lambda r: word.replace(\"oneself\", r), reflexive))     else:         forms = [word]      return forms<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e one&#8217;s \u0438 oneself \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435. \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u0440\u043c\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u043b\u043e\u0432, \u0442\u043e \u043e\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0435\u0440\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u0438\u0437 \u0444\u043e\u0440\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043c\u0435\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">def template_replace(word):     forms = []     forms = [word] if not \"(\" in word else [word.replace(\"(\", \"\").replace(\")\", \"\"), re.sub(\"\\([^)]+\\)\", \"\", word)]     forms = list(map(lambda f: f.replace(\"somebody\", \"\\S+\").replace(\"something\", \"\\S+\"), forms))     forms = list(map(replace_possessive_reflexive, forms))     return sum(forms, [])<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443.<\/p>\n<ol>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043a\u043e\u0431\u043a\u0438, \u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2013 \u0441 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, wild(ly) -> {wild, wildly}.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f somebody \u0438 something, \u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \\S+ \u2013 \u0433\u0440\u0443\u043f\u043f\u0443 \u043b\u044e\u0431\u044b\u0445 \u043d\u0435\u043f\u0440\u043e\u0431\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e replace_possessive_reflexive() \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 one&#8217;s \u0438 oneself.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u2013 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435. \u041a\u0430\u043a \u0432\u0435\u043b\u0438\u043a\u043e \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e? \u0412 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u043b\u044f \u0442\u0435\u0440\u043c\u043e\u0432, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u0438 \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 3 \u0444\u043e\u0440\u043c\u044b \u2013 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432, \u0432\u0442\u043e\u0440\u0430\u044f\/\u0442\u0440\u0435\u0442\u044c\u044f \u0444\u043e\u0440\u043c\u0430 \u0438 \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u0439. \u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c \u043a\u043e\u043d\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u044f. \u0412 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0435\u0440\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043a\u043e\u0431\u043a\u0438, \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u0435 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b, \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0442\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u0437 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 * 12 \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e 24 \u0444\u043e\u0440\u043c\u044b \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u0430, \u0434\u0432\u0443\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u0438\u044f \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u0442\u043e\u0433\u043e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"24*5=120\" alt=\"24*5=120\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44f\/bd1\/add\/44fbd1adda40281f5c263045efb606c6.svg\" width=\"102\" height=\"17\"\/><\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u044d\u0442\u043e\u0439 \u0446\u0438\u0444\u0440\u044b)<\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043c\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0412\u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2013 <strong>hold one&#8217;s breath<\/strong> (\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0430\u0433\u043e\u043b\u0430, \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0438 \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f). \u0418\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e 48 \u0444\u043e\u0440\u043c:<\/p>\n<ul>\n<li>\n<p>12 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u0430: <em>&#8216;hold my breath&#8217;, &#8216;hold mine breath&#8217;, &#8216;hold your breath&#8217;, &#8216;hold yours breath&#8217;, &#8216;hold his breath&#8217;, &#8216;hold her breath&#8217;, &#8216;hold hers breath&#8217;, &#8216;hold its breath&#8217;, &#8216;hold our breath&#8217;, &#8216;hold ours breath&#8217;, &#8216;hold their breath&#8217;, &#8216;hold theirs breath&#8217;<\/em>   <\/p>\n<\/li>\n<li>\n<p>24 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u044f, \u0441 \u0443\u0434\u0432\u043e\u0435\u043d\u043d\u043e\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e\u0439 \u0438 \u0441 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u043e\u0439: <em>&#8216;holdding my breath&#8217;, &#8216;holding my breath&#8217;, &#8216;holdding mine breath&#8217;, &#8216;holding mine breath&#8217;, &#8216;holdding your breath&#8217;, &#8216;holding your breath&#8217;, &#8216;holdding yours breath&#8217;, &#8216;holding yours breath&#8217;, &#8216;holdding his breath&#8217;, &#8216;holding his breath&#8217;, &#8216;holdding her breath&#8217;, &#8216;holding her breath&#8217;, &#8216;holdding hers breath&#8217;, &#8216;holding hers breath&#8217;, &#8216;holdding its breath&#8217;, &#8216;holding its breath&#8217;, &#8216;holdding our breath&#8217;, &#8216;holding our breath&#8217;, &#8216;holdding ours breath&#8217;, &#8216;holding ours breath&#8217;, &#8216;holdding their breath&#8217;, &#8216;holding their breath&#8217;, &#8216;holdding theirs breath&#8217;, &#8216;holding theirs breath&#8217;<\/em>   <\/p>\n<\/li>\n<li>\n<p>12 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0441 past participle: <em>&#8216;held my breath&#8217;, &#8216;held mine breath&#8217;, &#8216;held your breath&#8217;, &#8216;held yours breath&#8217;, &#8216;held his breath&#8217;, &#8216;held her breath&#8217;, &#8216;held hers breath&#8217;, &#8216;held its breath&#8217;, &#8216;held our breath&#8217;, &#8216;held ours breath&#8217;, &#8216;held their breath&#8217;, &#8216;held theirs breath&#8217;<\/em>   <\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0434\u043a\u0438. \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u043d\u0430 \u0432\u0435\u0441\u044c 5-\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e 662 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0433\u043b\u0430\u0433\u043e\u043b\u0430\u043c\u0438. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0442\u043e \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 91 \u0442\u0435\u0440\u043c \u0441 \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f\u043c\u0438, 31 \u2013 \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438 somebody\/something \u0438 61 \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b, \u0438 \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443. <\/p>\n<h2>\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443<\/h2>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u043e\u0432. \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0438\u0437 Excel, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 columns \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043b\u0438\u0441\u0442\u0430 Excel.<\/p>\n<pre><code class=\"python\">excel_data = pd.read_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'), dtype = str) df = pd.DataFrame(excel_data, columns=['Word', 'Russian', 'Chapters', 'IrrVerb'])<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0440\u043e\u043c\u0430\u043d\u0430, \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043d\u0430 \u0441\u0435\u0431\u044f \u0441\u043c\u0435\u043b\u043e\u0441\u0442\u044c \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0435\u043b\u0438\u043a\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044e \u0433\u043b\u0430\u0432 \u043d\u0430 \u0441\u043a\u0432\u043e\u0437\u043d\u0443\u044e. \u0412\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u0445 \u043a\u043d\u0438\u0433 \u043f\u043e 12 \u0438 10 \u0433\u043b\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0441 22-\u043c\u044f \u0433\u043b\u0430\u0432\u0430\u043c\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0442\u0435\u043a\u0441\u0442, \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438. \u0421\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u0432 \u043d\u0435\u043c \u0441\u043b\u043e\u0432\u043e Mr., \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c.<\/p>\n<pre><code class=\"python\">f = open(pathlib.Path('c:\/', 'ALL', 'LotR', 'Fellowship.txt')) text = f.read().replace('\\n', ' ').replace('\\t', ' ').replace('\\r', ' ').replace('Mr. ', 'Mr')  # \u0443\u0447\u0442\u0435\u0442 Mr.Baggins<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0433\u043b\u0430\u0432\u0430\u043c.<\/p>\n<pre><code class=\"python\">lotr = [] text = re.split('Chapter\\s\\d+', text)<\/code><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0432 0-\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435, \u0432 1-\u043c &#8212; \u0433\u043b\u0430\u0432\u0430 1 \u0438 \u0442.\u0434., \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u0430\u043c \u0433\u043b\u0430\u0432, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/df3\/81f\/3d6\/df381f3d695eb8537738d16de8a54dea.PNG\" alt=\"\u0412\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0433\u043b\u0430\u0432\u044b \u0441 \u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438\" title=\"\u0412\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0433\u043b\u0430\u0432\u044b \u0441 \u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438\" width=\"895\" height=\"180\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0433\u043b\u0430\u0432\u044b \u0441 \u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">for chapter in text:     lotr.append(re.split('[\\.?!]', chapter))<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0430. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043b\u0430\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0440\u043c. \u041e\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<pre><code class=\"python\">    ch = list(map(int, vec[0].split(',')))<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c, \u0442\u043e \u044d\u0442\u043e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0436\u0434\u043e\u043c\u0435\u0442\u0438\u0435. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<pre><code class=\"python\">    word = vec[1]     if word[-1:] == \"!\" or word[-1:] == \"?\":         forms = [word]<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432 \u043d\u0435\u0433\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d \u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 (isnan()). \u0414\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0430\u0433\u043e\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u043c 2-\u044e \u0438 3-\u044e \u0444\u043e\u0440\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c.<\/p>\n<pre><code class=\"python\">    else:         is_irrverb = False if isinstance(vec[2], float) and math.isnan(vec[2]) else True         if is_irrverb:             pos = vec[2].find(\", \")             if pos >= 0:                 past = vec[2][:pos]                 past_participle = vec[2][pos + 2:]             else:                 past = past_participle = vec[2]<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 template_replace(), \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c. \u041f\u0440\u043e\u0441\u043f\u0440\u044f\u0433\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<pre><code class=\"python\">        forms = template_replace(word)         forms = forms + sum(list(map(lambda f: generate_verbs(f, is_irrverb), forms)), [])<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u044b \u0434\u043b\u044f 2-\u0439 \u0438 3-\u0439 \u0444\u043e\u0440\u043c.<\/p>\n<pre><code class=\"python\">        if is_irrverb:             forms = forms + template_replace(past)             if past_participle != past:                 forms = forms + template_replace(past_participle)<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0438\u0449\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0443 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043a\u0440\u043e\u043c\u0435 \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0433\u043b\u0430\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u0442\u0430\u0440\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 ch. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e filter(), \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0435\u0439 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e \\b{f}, \u0433\u0434\u0435 \\b &#8212; \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043b\u043e\u0432\u0430, \u0430 f &#8212; \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0430. \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0441 \u0434\u0436\u043e\u043a\u0435\u0440\u043e\u043c \u043d\u0430 \u043a\u043e\u043d\u0446\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u043e\u0434, \u043c\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u043e\u043c \u043f\u0440\u0438\u0435\u043c\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043d\u0435\u043c\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u043b\u0438 somebody\/something \u043d\u0430 \\S+.<\/p>\n<pre><code class=\"python\">    for f in forms:         for i in range(1, len(lotr)): # 0-\u044e \u0433\u043b\u0430\u0432\u0443 (\u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435) \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c             if not i in ch:                 match = list(filter(lambda sentence: re.search(rf'\\b{f}', sentence, flags=re.IGNORECASE), lotr[i]))                 if match:                     ch.append(i)<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438\u0449\u0435\u0442 \u0432\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u0430 \u0432 \u0433\u043b\u0430\u0432\u0443, \u0445\u043e\u0442\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435. \u0417\u0430\u0442\u043e \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>\u041d\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0433\u043b\u0430\u0432 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043f\u0438\u0441\u043e\u043a ch, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f.<\/p>\n<pre><code>    ch.sort()     return ch<\/code><\/pre>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 check_chapters() \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"python\">def check_chapters(vec):     global lotr     ch = list(map(int, vec[0].split(',')))      word = vec[1]     if word[-1:] == \"!\" or word[-1:] == \"?\":         forms = [word]     else:         is_irrverb = False if isinstance(vec[2], float) and math.isnan(vec[2]) else True          if is_irrverb:             pos = vec[2].find(\", \")             if pos >= 0:                 past = vec[2][:pos]                 past_participle = vec[2][pos + 2:]             else:                 past = past_participle = vec[2]         forms = template_replace(word)          forms = forms + sum(list(map(lambda f: generate_verbs(f, is_irrverb), forms)), [])         if is_irrverb:             forms = forms + template_replace(past)             if past_participle != past:                 forms = forms + template_replace(past_participle)      for f in forms:         for i in range(1, len(lotr)): # 0-\u044e \u0433\u043b\u0430\u0432\u0443 (\u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435) \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c             if not i in ch:                 match = list(filter(lambda sentence: re.search(rf'\\b{f}', sentence, flags=re.IGNORECASE), lotr[i]))                 if match:                     ch.append(i)      ch.sort()     return ch<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0443, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 New chapters:<\/p>\n<pre><code class=\"python\">df['New chapters'] = df[['Chapters', 'Word', 'IrrVerb']].apply(check_chapters, axis=1) df.to_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'))<\/code><\/pre>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u043e\u0432 \u2013 \u0441 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0433\u043b\u0430\u0433\u043e\u043b\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">test = df[['Chapters', 'Word', 'IrrVerb']] test = test[(test['IrrVerb'].str.len() > 0) &amp; (test['Word'].str.contains(\"one's\") | test['Word'].str.contains(\"something\") | test['Word'].str.contains(\"somebody\"))] print(test.apply(check_chapters, axis=1))<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0435\u0440\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u043c\u0438 (\u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0430\u043c \u0438 \u043b\u0438\u0448\u044c \u0437\u0430\u0442\u0435\u043c \u043f\u043e \u0433\u043b\u0430\u0432\u0430\u043c):<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"center\"><strong>\u0422\u0435\u0440\u043c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">find one&#8217;s way   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 12:<\/em>\u00a0 We could perhaps <strong>find our way<\/strong> through and come round to Rivendell from the north; but it would take too long, for I do not know the way, and our food would not last<\/p>\n<p><em>Chapter 2:<\/em>\u00a0He <strong>found his way<\/strong> into Mirkwood, as one would expect<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">make one&#8217;s way   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 3:<\/em>\u00a0 My plan was to leave the Shire secretly, and <strong>make my way<\/strong> to Rivendell; but now my footsteps are dogged, before ever I get to Buckland<\/p>\n<p><em>Chapter 16:<\/em>\u00a0 <strong>Make your ways<\/strong> to places where you can find grass, and so come in time to Elrond&#8217;s house, or wherever you wish to go<\/p>\n<p><em>Chapter 6:<\/em>\u00a0 Coming to the opening they found that they had <strong>made their way<\/strong> down through a cleft in a high sleep bank, almost a cliff<\/p>\n<p><em>Chapter 11:<\/em>\u00a0 Merry&#8217;s ponies had escaped altogether, and eventually (having a good deal of sense) they <strong>made their way<\/strong> to the Downs in search of Fatty Lumpkin<\/p>\n<p><em>Chapter 12:<\/em>\u00a0\u00a0They <strong>made their way<\/strong> slowly and cautiously round the south-western slopes of the hill, and came in a little while to the edge of the Road<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">make up one&#8217;s mind   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 10:<\/em>\u00a0 You must <strong>make up your mind<\/strong><\/p>\n<p><em>Chapter 19:<\/em>\u00a0 But before Sam could <strong>make up his mind<\/strong> what it was that he saw, the light faded; and now he thought he saw Frodo with a pale face lying fast asleep under a great dark cliff<\/p>\n<p><em>Chapter 16:<\/em>\u00a0 The eastern arch will probably prove to be the way that we must take; but before we <strong>make up our mind<\/strong>s we ought to look about us<\/p>\n<p><em>Chapter 22:<\/em>\u00a0 &#8216;Yet we must needs <strong>make up our mind<\/strong>s without his aid<\/p>\n<p><em>Chapter 4:<\/em>\u00a0 I am leaving the Shire as soon as ever I can \u2013 in fact I have <strong>made up my mind<\/strong> now not even to wait a day at Crickhollow, if it can be helped<\/p>\n<p><em>Chapter 21:<\/em>\u00a0Sam had long ago <strong>made up his mind<\/strong> that, though boats were maybe not as dangerous as he had been brought up to believe, they were far more uncomfortable than even he had imagined<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">one&#8217;s heart sink   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 11:<\/em>\u00a0 &#8216;It is getting late, and I don&#8217;t like this hole: it makes <strong>my heart sink<\/strong> somehow<\/p>\n<p><em>Chapter 14:<\/em> &#187;\u00a0 &#8216;&#187;The Shire,&#187; I said; but <strong>my heart sank<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">shake one&#8217;s head   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 2:<\/em>\u00a0\u00a0 \u2018They are sailing, sailing, sailing over the Sea, they are going into the West and leaving us,\u2019 said Sam, half chanting the words, <strong>shaking his head<\/strong> sadly and solemnly<\/p>\n<p><em>Chapter 4:<\/em>\u00a0 Too near the River,\u2019 he said, <strong>shaking his head<\/strong><\/p>\n<p><em>Chapter 9:<\/em> &#8216;\u00a0 \u2018There&#8217;s some mistake somewhere,&#8217; said Butterbur, <strong>shaking his head<\/strong><\/p>\n<p><em>Chapter 14:<\/em> &#8216; he said, <strong>shaking his head<\/strong><\/p>\n<p><em>Chapter 16:<\/em>\u00a0 &#8216;I am too weary to decide,&#8217; he said, <strong>shaking his head<\/strong><\/p>\n<p><em>Chapter 12:<\/em> &#8216;\u00a0 When he heard what Frodo had to tell, he became full of concern, and <strong>shook his head<\/strong> and sighed<\/p>\n<p><em>Chapter 15:<\/em>\u00a0\u00a0 Gimli looked up and <strong>shook his head<\/strong><\/p>\n<p><em>Chapter 22:<\/em>\u00a0Sam, who had been watching his master with great concern, <strong>shook his head<\/strong> and muttered: &#8216;Plain as a pikestaff it is, but it&#8217;s no good Sam Gamgee putting in his spoke just now<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">sleep on something   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 3:<\/em>\u00a0 \u2018Well, see you later \u2013 the day after tomorrow, if you don\u2019t go to <strong>sleep on<\/strong> the way<\/p>\n<p><em>Chapter 13:<\/em>\u00a0 His head seemed sunk in <strong>sleep on<\/strong> his breast, and a fold of his dark cloak was drawn over his face<\/p>\n<p><em>Chapter 18:<\/em>\u00a0 I cannot <strong>sleep on<\/strong> a perch<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">spring to one&#8217;s feet   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 2:<\/em> \u2019 cried Gandalf, <strong>springing to his feet<\/strong><\/p>\n<p><em>Chapter 11:<\/em> &#8216; asked Frodo, <strong>springing to his feet<\/strong><\/p>\n<p><em>Chapter 14:<\/em> &#8216; cried Frodo in amazement, <strong>springing to his feet<\/strong>, as if he expected the Ring to be demanded at once<\/p>\n<p><em>Chapter 16:<\/em>\u00a0\u00a0 With a suddenness that startled them all the wizard <strong>sprang to his feet<\/strong><\/p>\n<p><em>Chapter 8:<\/em>\u00a0\u00a0 The hobbits <strong>sprang to their feet<\/strong> in alarm, and ran to the western rim<\/p>\n<p><em>Chapter 9:<\/em>\u00a0\u00a0\u00a0The local hobbits stared in amazement, and then <strong>sprang to their feet <\/strong>and shouted for Barliman<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"151\" width=\"151\">\n<p align=\"left\">take one&#8217;s advice   <\/p>\n<\/td>\n<td>\n<p><em>Chapter 3:<\/em>\u00a0 If I <strong>take your advice<\/strong> I may not see Gandalf for a long while, and I ought to know what is the danger that pursues me<\/p>\n<p><em>Chapter 11:<\/em>\u00a0 When they saw them they were glad that they had <strong>taken his advice<\/strong>: the windows had been forced open and were swinging, and the curtains were flapping; the beds were tossed about, and the bolsters slashed and flung upon the floor; the brown mat was torn to pieces<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u0441\u043e 120 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u043f\u043e\u0438\u0441\u043a \u0432\u0441\u0435\u0445 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u043c, \u044f \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043b\u0430 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0441 4-\u044f\u0434\u0435\u0440\u043d\u044b\u043c Intel i5-8265U \u0438 8 \u0413\u0431 \u041e\u0417\u0423 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438\u0437 5 \u0442\u044b\u0441. \u0441\u0442\u0440\u043e\u043a \u0431\u044b\u043b \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0437\u0430 <strong>1.187<\/strong> \u0441\u0435\u043a\u0443\u043d\u0434. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b <strong>3.330<\/strong> \u043d\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u0435\u0436\u043d\u0438\u043c 10.482, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e4\/797\/d1b\/0e4797d1bbd6f73f2bd2702d1cda0e24.png\" alt=\"\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f: 4-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439, 6-\u0439 \u2013 \u043d\u043e\u0432\u044b\u0439\" title=\"\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f: 4-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439, 6-\u0439 \u2013 \u043d\u043e\u0432\u044b\u0439\" width=\"624\" height=\"221\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e4\/797\/d1b\/0e4797d1bbd6f73f2bd2702d1cda0e24.png\"\/><\/p>\n<div><figcaption>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f: 4-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439, 6-\u0439 \u2013 \u043d\u043e\u0432\u044b\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u043d\u0430 \u043d\u0435 \u043b\u0438\u0448\u0435\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 &#8212; \u043d\u0435 \u0437\u0430\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0430 \u043e\u0442 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u043d\u0435 \u0443\u0447\u0442\u0435\u0442 \u0444\u043b\u0435\u043a\u0441\u0438\u044e \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, take<strong>s<\/strong> his advice). \u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c.<\/p>\n<\/p>\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\/post\/722676\/\"> https:\/\/habr.com\/ru\/post\/722676\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/706224\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u00ab\u0412\u043b\u0430\u0441\u0442\u0435\u043b\u0438\u043d\u0430 \u041a\u043e\u043b\u0435\u0446\u00bb, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 (\u0441\u043b\u043e\u0432\u0430\/\u0441\u043b\u043e\u0432\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f) \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043b\u0430\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u0435 \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u043e\u043a\u043e\u044f, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041b\u044e\u0431\u0438\u043c\u0430\u044f \u043a\u043d\u0438\u0433\u0430, \u0441\u043d\u044f\u0442\u0430\u044f \u043d\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 MVP \u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u043b\u0430 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0435 (\\b{term}, \u0433\u0434\u0435 \\b \u2013 \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043b\u043e\u0432\u0430), \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u043b\u0438 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0444\u043b\u0435\u043a\u0441\u0438\u044f\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, -s, -ed, -ing). \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0434\u0436\u043e\u043a\u0435\u0440\u043e\u043c \u043d\u0430 \u043a\u043e\u043d\u0446\u0435. \u041d\u043e \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0432\u0435\u0441\u043e\u043c\u0443\u044e \u0434\u043e\u043b\u044e \u043c\u043e\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0430\u0440\u044b \u0431\u0435\u0437\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Elasticsearch \u044f, \u043a\u0430\u043a \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u0438 \u0432\u0435\u0447\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f, \u0440\u0435\u0448\u0438\u043b\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. \u0421\u043a\u0443\u0434\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043c\u0435\u043d\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0433\u0430\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043d\u0430 \u0432\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043c\u043e\u0433\u0443\u0447\u0435\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0447\u0430\u0441\u0442\u044c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0443\u0436\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u043d \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u041d\u0443 \u043a\u0430\u043a \u0434\u0430\u043d \u2013 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0440\u0443\u043a\u0430\u043c\u0438 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0443\u043f\u043e\u0440\u043d\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430. \u0414\u0430\u043d \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/706224\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0441 \u0432\u0434\u0432\u043e\u0435 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u043e\u043c (\u00ab\u0411\u0440\u0430\u0442\u0441\u0442\u0432\u043e \u041a\u043e\u043b\u044c\u0446\u0430\u00bb). \u0412 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 11.690 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u00ab\u0442\u0435\u0440\u043c \u2013 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u2013 \u043d\u043e\u043c\u0435\u0440 \u0433\u043b\u0430\u0432\u044b\u00bb. \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 Excel.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437, \u044f \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u0432\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u043c \u0433\u043d\u0435\u0437\u0434\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 pivot_table() \u0438\u0437 pandas. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c 5.404 \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f &#8212; 5.354.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u043d\u044f \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u0435, \u0430 \u0432 \u0440\u043e\u043c\u0430\u043d\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u0432\u0438\u0434\u0443 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043b\u0430\u0443\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, run \u2013 ran \u2013 run) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432 \u043f\u043e \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u042f \u0441\u043a\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432. \u041e\u043d \u043d\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b 294 \u0448\u0442\u0443\u043a\u0438, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0438 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0447\u0438: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, cloven (p.p. \u043e\u0442 cleave) \u0432\u043c\u0435\u0441\u0442\u043e cleft (\u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435). \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b \u0443 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, burn), \u0430 leap \u0434\u0430\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 &#8212; leaped \u0438 leapt.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0430 \u0438\u0445 \u0441\u043f\u0438\u0441\u043e\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435:<\/p>\n<figure class=\"\">\n<div><figcaption>\u0418 \u0442.\u0434. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 read_csv(), \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0431\u0435\u043b\u044b:<\/p>\n<pre><code class=\"python\">import pandas as pd verb_data = pd.read_csv(pathlib.Path('c:\/', 'ALL', 'LotR', '\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b.txt'),                        sep=\" \", header=None, names=[\"Inf\", \"Past\", \"PastParticiple\"], index_col=0)<\/code><\/pre>\n<p>\u042f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u043c index_col, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438\u0432\u044b \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c:<\/p>\n<pre><code class=\"python\">excel_data = pd.read_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'), dtype = str) df = pd.DataFrame(excel_data, columns=['Word', 'Russian', 'Chapters'])<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0435\u043c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u043b\u0430\u0433\u043e\u043b\u0430 \u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u044b. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435.   <\/p>\n<pre><code class=\"python\">def check_irrverbs(word):     global verb_data      # \u0431\u0435\u0440\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430     arr = word.split(' ')     w, *tail = arr # = arr[0], arr[1:]     # \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0445\u0432\u043e\u0441\u0442     tail = \" \".join(tail)      # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c     if w in verb_data.index:         # \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0444\u043e\u0440\u043c\u044b Past \u0438 Past Participle         # \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u043e\u0440\u043c\u0443         if verb_data.loc[w][\"Past\"] == verb_data.loc[w][\"PastParticiple\"]:             return verb_data.loc[w][\"Past\"] + \" \" + tail         return \", \".join([v + \" \" + tail for v in verb_data.loc[w].tolist()])      return \"\"<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f make up one&#8217;s mind \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 made up one&#8217;s mind.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0443, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0438 \u0437\u0430\u0442\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043d\u043e\u0432\u044b\u0439 Excel-\u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"python\">df['IrrVerb'] = df['Word'].apply(check_irrverbs) df.to_excel(pathlib.Path('c:\/', 'ALL', 'LotR', '\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0422\u043e\u043b\u043a\u0438\u0435\u043d\u0430 \u0441\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439.xlsx'))<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 Excel-\u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 2-\u044e (Past) \u0438 3-\u044e (Past Participle) \u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u0443\u0441\u0442.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u043e\u0432\u0430\u0440\u044c + \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435\u0433\u043e \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c 662.<\/p>\n<h2>\u0421\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0444\u043e\u0440\u043c\u044b \u0438 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445, \u0438 \u0434\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432.<\/p>\n<pre><code class=\"python\">def generate_verbs(word, is_irrverb):     forms = []      # \u0432\u0437\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430     verb, tail = word, \"\"     pos = word.find(\" \")     if pos >= 0:         verb = word[:pos]         tail = word[pos:]      consonant = \"bcdfghjklmnpqrstvwxz\"     last = verb[-1]      # \u0433\u043b\u0430\u0433\u043e\u043b \u0432\u043e 2 \u0438 3 \u0444\u043e\u0440\u043c\u0430\u0445     if not is_irrverb:         if last in consonant:             forms.append(verb + last + \"ed\" + tail) # stop -> stopped             forms.append(verb + \"ed\" + tail) # \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u0435\u0437 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f         elif last == \"y\":             if verb[-2] in consonant:                 forms.append(verb[:-1] + \"ied\" + tail) # carry -> carried             else:                 forms.append(verb + \"ed\" + tail) # play -> played         elif last == \"e\":             forms.append(verb + \"d\" + tail) # arrive -> arrived         else:             forms.append(verb + \"ed\" + tail)      # \u0433\u0435\u0440\u0443\u043d\u0434\u0438\u0439, \u043e\u043d \u0436\u0435 ing-\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0433\u043b\u0430\u0433\u043e\u043b\u0430     if verb[-2:] == \"ie\":         forms.append(verb[:-2] + \"ying\" + tail) # lie -> lying     elif last == \"e\":         forms.append(verb[:-1] + \"ing\" + tail) # write -> writing     elif last in consonant:         forms.append(verb + last + \"ing\" + tail) # sit -> sitting         forms.append(verb + \"ing\" + tail) # sit -> sitting     else:         forms.append(verb + \"ing\" + tail)      return forms<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435, \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043b\u0438\u0431\u043e \u0432\u0441\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430 \u043a\u0430\u043a\u0443\u044e \u0431\u0443\u043a\u0432\u0443 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f last) \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u0433\u043b\u0430\u0433\u043e\u043b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043b\u0438\u0431\u043e \u0433\u043b\u0430\u0441\u043d\u044b\u0445, \u043b\u0438\u0431\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u0445. \u0421\u043f\u0438\u0441\u043e\u043a \u0433\u043b\u0430\u0441\u043d\u044b\u0445 \u0431\u044b\u043b \u0431\u044b \u043a\u043e\u0440\u043e\u0447\u0435, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u0443\u044e, \u0442\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a consonant.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u0432\u0442\u043e\u0440\u0430\u044f \u0438 \u0442\u0440\u0435\u0442\u044c\u044f \u0444\u043e\u0440\u043c\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0435\u043a\u0441\u0438\u0439 -d, -ed, -ied \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0432\u0443\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u0438 \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. \u0414\u043b\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043e\u0431\u0435 \u0444\u043e\u0440\u043c\u044b \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446.<\/p>\n<p>\u0413\u0435\u0440\u0443\u043d\u0434\u0438\u0439 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u043d\u043e \u043e\u043f\u044f\u0442\u044c-\u0442\u0430\u043a\u0438 \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0438 \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u043e\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p>\u0412\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a forms, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0447\u0430\u0441\u0442\u044f\u0445 \u0440\u0435\u0447\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430, \u0434\u0430 \u044d\u0442\u043e \u0438 \u043c\u0430\u043b\u043e\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u0432\u0438\u0434\u0443 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u2013 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0441\u043b\u043e\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0438 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443. \u041c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b. \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435, \u0442\u043e \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e. <\/p>\n<h2>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/h2>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432, \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0438\u0434 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, &#8212; \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f: \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 one\u2019s, \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e\u0435 oneself \u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 somebody \u0438 something. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u2013 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438\u0442\u044f\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f (my, your, his \u0438 \u0442.\u0434.), \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f (myself, yourself, himself \u0438 \u0442.\u0434.) \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 one\u2019s \u0438 oneself:<\/p>\n<pre><code class=\"python\">def replace_possessive_reflexive(word):     possessive = [\"my\", \"mine\", \"your\", \"yours\", \"his\", \"her\", \"hers\", \"its\", \"our\", \"ours\", \"their\", \"theirs\"]     reflexive = [\"myself\", \"yourself\", \"himself\", \"herself\", \"itself\", \"ourselves\", \"yourselves\", \"themselves\"]      # \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c one's \u043d\u0430 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 possessive     if \"one's\" in word:         forms = list(map(lambda p: word.replace(\"one's\", p), possessive))     elif \"oneself\" in word:         # \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c oneself \u043d\u0430 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0437 reflexive         forms = list(map(lambda r: word.replace(\"oneself\", r), reflexive))     else:         forms = [word]      return forms<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e one&#8217;s \u0438 oneself \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435. \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u0440\u043c\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u043b\u043e\u0432, \u0442\u043e \u043e\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0435\u0440\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u0438\u0437 \u0444\u043e\u0440\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043c\u0435\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u043e\u0438\u043c\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">def template_replace(word):     forms = []     forms = [word] if not \"(\" in word else [word.replace(\"(\", \"\").replace(\")\", \"\"), re.sub(\"\\([^)]+\\)\", \"\", word)]     forms = list(map(lambda f: f.replace(\"somebody\", \"\\S+\").replace(\"something\", \"\\S+\"), forms))     forms = list(map(replace_possessive_reflexive, forms))     return sum(forms, [])<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443.<\/p>\n<ol>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043a\u043e\u0431\u043a\u0438, \u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2013 \u0441 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, wild(ly) -> {wild, wildly}.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f somebody \u0438 something, \u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \\S+ \u2013 \u0433\u0440\u0443\u043f\u043f\u0443 \u043b\u044e\u0431\u044b\u0445 \u043d\u0435\u043f\u0440\u043e\u0431\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e replace_possessive_reflexive() \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 one&#8217;s \u0438 oneself.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-346792","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346792","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=346792"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346792\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}