{"id":310207,"date":"2020-09-20T21:00:29","date_gmt":"2020-09-20T21:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310207"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-09-20T21:00:29","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310207","title":{"rendered":"ANYKS Spell-checker"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/519854\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6x\/xb\/4g\/6xxb4gv7y-hbpplohsmhxvgduii.jpeg\" alt=\"image\"><\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u044d\u0442\u043e \u043c\u043e\u044f \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u0440\u0430\u043d\u0435\u0435 \u044f \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u043e <a href=\"https:\/\/habr.com\/ru\/post\/499064\"><b>\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 ALM<\/b><\/a>. \u0421\u0435\u0439\u0447\u0430\u0441, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a <a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\"><b>ASC<\/b><\/a> (\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/anyks\/alm\" rel=\"nofollow\"><b>ALM<\/b><\/a>).<\/p>\n<p>  \u0414\u0430, \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u044f \u043c\u043e\u0433\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e <a href=\"https:\/\/github.com\/bakwc\/JamSpell\" rel=\"nofollow\"><b>JamSpell<\/b><\/a>, \u0441 \u043d\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c. \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442 <a href=\"http:\/\/docs.deeppavlov.ai\/en\/master\/features\/models\/spelling_correction.html\" rel=\"nofollow\"><b>DeepPavlov<\/b><\/a>, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043d\u043e \u044f \u0441 \u043d\u0435\u0439 \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u043b\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439:<\/h3>\n<p>  <\/p>\n<ol>\n<li>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u043b\u043e\u0432\u0430\u0445 \u0441 \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0434\u043e 4-\u0445 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u043f\u043e <b>\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0443.<\/b><\/li>\n<li>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0432 \u0441\u043b\u043e\u0432\u0430\u0445 (\u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435, \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430) \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/li>\n<li><b>\u0401<\/b>\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/li>\n<li>\u041f\u0440\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u044b \u0441\u043b\u043e\u0432\u0430, \u0434\u043b\u044f (\u0438\u043c\u0451\u043d \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439) \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/li>\n<li>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430.<\/li>\n<li>\u041f\u043e\u0438\u0441\u043a \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f (\u043e\u0448\u0438\u0431\u043e\u043a, \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a, \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430).<\/li>\n<\/ol>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/h4>\n<p>  <\/p>\n<ul>\n<li>MacOS X<\/li>\n<li>FreeBSD<\/li>\n<li>Linux<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u0421++11, \u0435\u0441\u0442\u044c \u043f\u043e\u0440\u0442 \u0434\u043b\u044f <a href=\"https:\/\/pypi.org\/project\/anyks-sc\" rel=\"nofollow\"><b>Python3<\/b><\/a><\/p>\n<h3>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0438<\/h3>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/th>\n<th>\u0420\u0430\u0437\u043c\u0435\u0440 (\u0413\u0431)<\/th>\n<th>\u041e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c (\u0413\u0431)<\/th>\n<th>\u0420\u0430\u0437\u043c\u0435\u0440 N-\u0433\u0440\u0430\u043c\u043c<\/th>\n<th>\u042f\u0437\u044b\u043a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/cloud.mail.ru\/public\/2b9E\/sz9b8YGJ1\" rel=\"nofollow\">wittenbell-3-big.asc<\/a><\/td>\n<td>1.97<\/td>\n<td>15.6<\/td>\n<td>3<\/td>\n<td>RU<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cloud.mail.ru\/public\/5zo5\/2F6uav8fz\" rel=\"nofollow\">wittenbell-3-middle.asc<\/a><\/td>\n<td>1.24<\/td>\n<td>9.7<\/td>\n<td>3<\/td>\n<td>RU<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cloud.mail.ru\/public\/3SBP\/35WJFKFyd\" rel=\"nofollow\">mkneserney-3-middle.asc<\/a><\/td>\n<td>1.33<\/td>\n<td>9.7<\/td>\n<td>3<\/td>\n<td>RU<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cloud.mail.ru\/public\/21jt\/YEW493XQa\" rel=\"nofollow\">wittenbell-3-single.asc<\/a><\/td>\n<td>0.772<\/td>\n<td>5.14<\/td>\n<td>3<\/td>\n<td>RU<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cloud.mail.ru\/public\/5Adc\/5x5Ea1eA6\" rel=\"nofollow\">wittenbell-5-single.asc<\/a><\/td>\n<td>1.37<\/td>\n<td>10.7<\/td>\n<td>5<\/td>\n<td>RU<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<a href=\"http:\/\/www.dialog-21.ru\/evaluation\/2016\/spelling_correction\" rel=\"nofollow\"><b>\u00ab\u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a\u00bb 2016 \u0433\u043e\u0434\u0430 \u043e\u0442 Dialog21<\/b><\/a>. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c:\u00a0<a href=\"https:\/\/cloud.mail.ru\/public\/5zo5\/2F6uav8fz\" rel=\"nofollow\">wittenbell-3-middle.asc<\/a>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u0441\u0442<\/th>\n<th>Precision<\/th>\n<th>Recall<\/th>\n<th>FMeasure<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u0420\u0435\u0436\u0438\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a<\/td>\n<td>76.97<\/td>\n<td>62.71<\/td>\n<td>69.11<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0435\u0436\u0438\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a<\/td>\n<td>73.72<\/td>\n<td>60.53<\/td>\n<td>66.48<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442, \u0432\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043d\u0438\u0436\u0435.<\/p>\n<h4>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/cloud.mail.ru\/public\/3rzx\/2HwqDU9j5\" rel=\"nofollow\">test.txt<\/a>\u00a0&#8212; \u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li><a href=\"https:\/\/cloud.mail.ru\/public\/3dAN\/J4EzV4U3W\" rel=\"nofollow\">correct.txt<\/a>\u00a0&#8212; \u0422\u0435\u043a\u0441\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432<\/li>\n<li><a href=\"https:\/\/cloud.mail.ru\/public\/ZTRf\/4sUS1Sc2p\" rel=\"nofollow\">evaluate.py<\/a>\u00a0&#8212; \u0421\u043a\u0440\u0438\u043f\u0442 Python3 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0430\u043c\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0432 \u0440\u0430\u0432\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043e\u0431\u0443\u0447\u0438\u043c \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0430 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0442\u0435\u0441\u0442. <\/p>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0448\u0435 <a href=\"https:\/\/github.com\/bakwc\/JamSpell\" rel=\"nofollow\">JamSpell<\/a>.<\/p>\n<h3><a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\">ASC<\/a> vs <a href=\"https:\/\/github.com\/bakwc\/JamSpell\" rel=\"nofollow\">JamSpell<\/a><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>ASC<\/b>  <\/p>\n<pre><code class=\"bash\">$ git clone --recursive https:\/\/github.com\/anyks\/asc.git $ cd .\/asc  $ mkdir .\/build $ cd .\/build  $ cmake .. $ make <\/code><\/pre>\n<p>  <b>JamSpell<\/b>  <\/p>\n<pre><code class=\"bash\">$ git clone https:\/\/github.com\/bakwc\/JamSpell.git $ cd .\/JamSpell  $ mkdir .\/build $ cd .\/build  $ cmake .. $ make <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>ASC<\/b><\/p>\n<p>  <b>train.json<\/b>  <\/p>\n<pre><code class=\"json\">{   &quot;ext&quot;: &quot;txt&quot;,   &quot;size&quot;: 3,   &quot;alter&quot;: {&quot;\u0435&quot;:&quot;\u0451&quot;},   &quot;debug&quot;: 1,   &quot;threads&quot;: 0,   &quot;method&quot;: &quot;train&quot;,   &quot;allow-unk&quot;: true,   &quot;reset-unk&quot;: true,   &quot;confidence&quot;: true,   &quot;interpolate&quot;: true,   &quot;mixed-dicts&quot;: true,   &quot;only-token-words&quot;: true,   &quot;locale&quot;: &quot;en_US.UTF-8&quot;,   &quot;smoothing&quot;: &quot;wittenbell&quot;,   &quot;pilots&quot;: [&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;],   &quot;corpus&quot;: &quot;.\/texts\/correct.txt&quot;,   &quot;w-bin&quot;: &quot;.\/dictionary\/3-middle.asc&quot;,   &quot;w-vocab&quot;: &quot;.\/train\/lm.vocab&quot;,   &quot;w-arpa&quot;: &quot;.\/train\/lm.arpa&quot;,   &quot;mix-restwords&quot;: &quot;.\/similars\/letters.txt&quot;,   &quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;,   &quot;bin-code&quot;: &quot;ru&quot;,   &quot;bin-name&quot;: &quot;Russian&quot;,   &quot;bin-author&quot;: &quot;You name&quot;,   &quot;bin-copyright&quot;: &quot;You company LLC&quot;,   &quot;bin-contacts&quot;: &quot;site: https:\/\/example.com, e-mail: info@example.com&quot;,   &quot;bin-lictype&quot;: &quot;MIT&quot;,   &quot;bin-lictext&quot;: &quot;... License text ...&quot;,   &quot;embedding-size&quot;: 28,   &quot;embedding&quot;: {       &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5,       &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9,       &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14,       &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20,       &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22,       &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26,       &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26,       &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26,       &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27,       &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0,       &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3,       &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11,       &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15,       &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7   } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/asc -r-json .\/train.json <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python3  <\/p>\n<pre><code class=\"python\">import asc  asc.setSize(3) asc.setAlmV2() asc.setThreads(0) asc.setLocale(&quot;en_US.UTF-8&quot;)  asc.setOption(asc.options_t.uppers) asc.setOption(asc.options_t.allowUnk) asc.setOption(asc.options_t.resetUnk) asc.setOption(asc.options_t.mixDicts) asc.setOption(asc.options_t.tokenWords) asc.setOption(asc.options_t.confidence) asc.setOption(asc.options_t.interpolate)  asc.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;)  asc.setPilots([&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;]) asc.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  def statusArpa1(status):     print(&quot;Build arpa&quot;, status)  def statusArpa2(status):     print(&quot;Write arpa&quot;, status)  def statusVocab(status):     print(&quot;Write vocab&quot;, status)  def statusIndex(text, status):     print(text, status)  def status(text, status):     print(text, status)  asc.collectCorpus(&quot;.\/texts\/correct.txt&quot;, asc.smoothing_t.wittenBell, 0.0, False, False, status)  asc.buildArpa(statusArpa1)  asc.writeArpa(&quot;.\/train\/lm.arpa&quot;, statusArpa2)  asc.writeVocab(&quot;.\/train\/lm.vocab&quot;, statusVocab)  asc.setCode(&quot;RU&quot;) asc.setLictype(&quot;MIT&quot;) asc.setName(&quot;Russian&quot;) asc.setAuthor(&quot;You name&quot;) asc.setCopyright(&quot;You company LLC&quot;) asc.setLictext(&quot;... License text ...&quot;) asc.setContacts(&quot;site: https:\/\/example.com, e-mail: info@example.com&quot;)  asc.setEmbedding({      &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5,      &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9,      &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14,      &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20,      &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22,      &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26,      &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26,      &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26,      &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27,      &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0,      &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3,      &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11,      &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15,      &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7 }, 28)  asc.saveIndex(&quot;.\/dictionary\/3-middle.asc&quot;, &quot;&quot;, 128, statusIndex) <\/code><\/pre>\n<p>  <b>JamSpell<\/b><\/p>\n<pre><code class=\"bash\">$ .\/main\/jamspell train ..\/test_data\/alphabet_ru.txt ..\/test_data\/correct.txt .\/model.bin <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>ASC<\/b><\/p>\n<p>  <b>spell.json<\/b>  <\/p>\n<pre><code class=\"json\">{     &quot;debug&quot;: 1,     &quot;threads&quot;: 0,     &quot;method&quot;: &quot;spell&quot;,     &quot;spell-verbose&quot;: true,     &quot;confidence&quot;: true,     &quot;mixed-dicts&quot;: true,     &quot;asc-split&quot;: true,     &quot;asc-alter&quot;: true,     &quot;asc-esplit&quot;: true,     &quot;asc-rsplit&quot;: true,     &quot;asc-uppers&quot;: true,     &quot;asc-hyphen&quot;: true,     &quot;asc-wordrep&quot;: true,     &quot;r-text&quot;: &quot;.\/texts\/test.txt&quot;,     &quot;w-text&quot;: &quot;.\/texts\/output.txt&quot;,     &quot;r-bin&quot;: &quot;.\/dictionary\/3-middle.asc&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/asc -r-json .\/spell.json <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python3  <\/p>\n<pre><code class=\"python\">import asc  asc.setAlmV2() asc.setThreads(0)  asc.setOption(asc.options_t.uppers) asc.setOption(asc.options_t.ascSplit) asc.setOption(asc.options_t.ascAlter) asc.setOption(asc.options_t.ascESplit) asc.setOption(asc.options_t.ascRSplit) asc.setOption(asc.options_t.ascUppers) asc.setOption(asc.options_t.ascHyphen) asc.setOption(asc.options_t.ascWordRep) asc.setOption(asc.options_t.mixDicts) asc.setOption(asc.options_t.confidence)  def status(text, status):     print(text, status)  asc.loadIndex(&quot;.\/dictionary\/3-middle.asc&quot;, &quot;&quot;, status)  f1 = open('.\/texts\/test.txt') f2 = open('.\/texts\/output.txt', 'w')  for line in f1.readlines():     res = asc.spell(line)     f2.write(&quot;%s\\n&quot; % res[0])  f2.close() f1.close() <\/code><\/pre>\n<p>  <b>JamSpell<\/b><\/p>\n<p>  \u0422\u0430\u043a-\u043a\u0430\u043a \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f Python \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C++  <\/p>\n<pre><code class=\"cpp\">#include &lt;fstream&gt; #include &lt;iostream&gt; #include &lt;jamspell\/spell_corrector.hpp&gt;  \/\/ \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BOOST #ifdef USE_BOOST_CONVERT \t#include &lt;boost\/locale\/encoding_utf.hpp&gt; \/\/ \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 #else \t#include &lt;codecvt&gt; #endif  using namespace std;  \/**  * convert \u041c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438 utf-8 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443  * @param  str \u0441\u0442\u0440\u043e\u043a\u0430 utf-8 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  * @return     \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430  *\/ const string convert(const wstring &amp; str){ \t\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \tstring result = &quot;&quot;; \t\/\/ \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430 \tif(!str.empty()){ \/\/ \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BOOST #ifdef USE_BOOST_CONVERT \t\t\/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \t\tusing boost::locale::conv::utf_to_utf; \t\t\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 utf-8 \u0441\u0442\u0440\u043e\u043a\u0443 \t\tresult = utf_to_utf &lt;char&gt; (str.c_str(), str.c_str() + str.size()); \/\/ \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 #else \t\t\/\/ \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430 UTF-8 \t\tusing convert_type = codecvt_utf8 &lt;wchar_t, 0x10ffff, little_endian&gt;; \t\t\/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \t\twstring_convert &lt;convert_type, wchar_t&gt; conv; \t\t\/\/ wstring_convert &lt;codecvt_utf8 &lt;wchar_t&gt;&gt; conv; \t\t\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 utf-8 \u0441\u0442\u0440\u043e\u043a\u0443 \t\tresult = conv.to_bytes(str); #endif \t} \t\/\/ \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \treturn result; }  \/**  * convert \u041c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 utf-8  * @param  str \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  * @return     \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 utf-8  *\/ const wstring convert(const string &amp; str){ \t\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \twstring result = L&quot;&quot;; \t\/\/ \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430 \tif(!str.empty()){ \/\/ \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BOOST #ifdef USE_BOOST_CONVERT \t\t\/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \t\tusing boost::locale::conv::utf_to_utf; \t\t\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 utf-8 \u0441\u0442\u0440\u043e\u043a\u0443 \t\tresult = utf_to_utf &lt;wchar_t&gt; (str.c_str(), str.c_str() + str.size()); \/\/ \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 #else \t\t\/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \t\t\/\/ wstring_convert &lt;codecvt_utf8 &lt;wchar_t&gt;&gt; conv; \t\twstring_convert &lt;codecvt_utf8_utf16 &lt;wchar_t, 0x10ffff, little_endian&gt;&gt; conv; \t\t\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 utf-8 \u0441\u0442\u0440\u043e\u043a\u0443 \t\tresult = conv.from_bytes(str); #endif \t} \t\/\/ \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \treturn result; }  \/**  * safeGetline \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430  * @param  is \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a  * @param  t  \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430  * @return    \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a  *\/ istream &amp; safeGetline(istream &amp; is, string &amp; t){ \t\/\/ \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \tt.clear();  \tistream::sentry se(is, true); \tstreambuf * sb = is.rdbuf();  \tfor(;;){ \t\tint c = sb-&gt;sbumpc(); \t\tswitch(c){  \t\t\tcase '\\n': return is; \t\t\tcase '\\r': \t\t\t\tif(sb-&gt;sgetc() == '\\n') sb-&gt;sbumpc(); \t\t\t\treturn is; \t\t\tcase streambuf::traits_type::eof(): \t\t\t\tif(t.empty()) is.setstate(ios::eofbit); \t\t\t\treturn is; \t\t\tdefault: t += (char) c; \t\t} \t} }  \/** * main \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f *\/ int main(){ \t\/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043e\u0440 \tNJamSpell::TSpellCorrector corrector; \t\/\/ \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \tcorrector.LoadLangModel(&quot;model.bin&quot;); \t\/\/ \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \tifstream file1(&quot;.\/test_data\/test.txt&quot;, ios::in); \t\/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \tif(file1.is_open()){ \t\t\/\/ \u0421\u0442\u0440\u043e\u043a\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \t\tstring line = &quot;&quot;, res = &quot;&quot;; \t\t\/\/ \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \t\tofstream file2(&quot;.\/test_data\/output.txt&quot;, ios::out); \t\t\/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \t\tif(file2.is_open()){ \t\t\t\/\/ \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0443\u0434\u0430\u0447\u043d\u043e \t\t\twhile(file1.good()){ \t\t\t\t\/\/ \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \t\t\t\tsafeGetline(file1, line); \t\t\t\t\/\/ \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044e \t\t\t\tif(!line.empty()){ \t\t\t\t\t\/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \t\t\t\t\tres = convert(corrector.FixFragment(convert(line))); \t\t\t\t\t\/\/ \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b \t\t\t\t\tif(!res.empty()){ \t\t\t\t\t\t\/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \t\t\t\t\t\tres.append(&quot;\\n&quot;); \t\t\t\t\t\t\/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u0430\u0439\u043b \t\t\t\t\t\tfile2.write(res.c_str(), res.size()); \t\t\t\t\t} \t\t\t\t} \t\t\t} \t\t\t\/\/ \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \t\t\tfile2.close(); \t\t} \t\t\/\/ \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \t\tfile1.close(); \t}     return 0; } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c  <\/p>\n<pre><code class=\"bash\">$ g++ -std=c++11 -I..\/JamSpell -L.\/build\/jamspell -L.\/build\/contrib\/cityhash -L.\/build\/contrib\/phf -ljamspell_lib -lcityhash -lphf .\/test.cpp -o .\/bin\/test  $ .\/bin\/test <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">$ python3 evaluate.py .\/texts\/test.txt .\/texts\/correct.txt .\/texts\/output.txt <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <b>ASC<\/b>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>Precision<\/th>\n<th>Recall<\/th>\n<th>FMeasure<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>92.13<\/td>\n<td>82.51<\/td>\n<td>87.05<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <b>JamSpell<\/b>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>Precision<\/th>\n<th>Recall<\/th>\n<th>FMeasure<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>77.87<\/td>\n<td>63.36<\/td>\n<td>69.87<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 <a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\"><b>ASC<\/b><\/a> \u2014 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u0440\u044f\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043e\u0442\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043d\u0430\u0439\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u0436\u0438\u0437\u043d\u0438, \u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u0430\u043a-\u0442\u043e \u043d\u0430\u0434\u043e.<\/p>\n<h4>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u044f<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0433\u0440\u044f\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0440\u0435\u0434\u043a\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u043b\u043e\u0432\u0430 \u0438 N-\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a.<\/li>\n<li>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ALM<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>collect.json<\/b>  <\/p>\n<pre><code class=\"json\">{ \t&quot;size&quot;: 3, \t&quot;debug&quot;: 1, \t&quot;threads&quot;: 0, \t&quot;ext&quot;: &quot;txt&quot;, \t&quot;method&quot;: &quot;train&quot;, \t&quot;allow-unk&quot;: true, \t&quot;mixed-dicts&quot;: true, \t&quot;only-token-words&quot;: true, \t&quot;smoothing&quot;: &quot;wittenbell&quot;, \t&quot;locale&quot;: &quot;en_US.UTF-8&quot;, \t&quot;w-abbr&quot;: &quot;.\/output\/alm.abbr&quot;, \t&quot;w-map&quot;: &quot;.\/output\/alm.map&quot;, \t&quot;w-vocab&quot;: &quot;.\/output\/alm.vocab&quot;, \t&quot;w-words&quot;: &quot;.\/output\/words.txt&quot;, \t&quot;corpus&quot;: &quot;.\/texts\/corpus&quot;, \t&quot;abbrs&quot;: &quot;.\/abbrs\/abbrs.txt&quot;, \t&quot;goodwords&quot;: &quot;.\/texts\/whitelist\/words.txt&quot;, \t&quot;badwords&quot;: &quot;.\/texts\/blacklist\/garbage.txt&quot;, \t&quot;mix-restwords&quot;: &quot;.\/texts\/similars\/letters.txt&quot;, \t&quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/alm -r-json .\/collect.json <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><b>size<\/b> \u2014 \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3<\/li>\n<li><b>debug<\/b> \u2014 \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li><b>threads<\/b> \u2014 \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430<\/li>\n<li><b>ext<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/li>\n<li><b>allow-unk<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u2329unk\u232a\u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>mixed-dicts<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/li>\n<li><b>only-token-words<\/b> \u2014 \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432<\/li>\n<li><b>smoothing<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f <b>wittenbell<\/b> (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e)<\/li>\n<li><b>locale<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c)<\/li>\n<li><b>w-abbr<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u044b \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440<\/li>\n<li><b>w-map<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<li><b>w-vocab<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c<\/li>\n<li><b>w-words<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439)<\/li>\n<li><b>corpus<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0440\u043f\u0443\u0441\u0430<\/li>\n<li><b>abbrs<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043e\u0431\u0449\u0435\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043c\u044b\u0435 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (\u0421\u0428\u0410, \u0424\u0421\u0411, \u041a\u0413\u0411 &#8230;)<\/li>\n<li><b>goodwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>badwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>mix-restwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"https:\/\/github.com\/anyks\/alm#file-of-similar-letters-in-different-dictionaries\" rel=\"nofollow\">\u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/a><\/li>\n<li><b>alphabet<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435)<\/li>\n<\/ul>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import alm  # \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3 alm.setSize(3) # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 alm.setThreads(0) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c) alm.setLocale(&quot;en_US.UTF-8&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) alm.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.setOption(alm.options_t.allowUnk) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setOption(alm.options_t.mixDicts) # \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 alm.setOption(alm.options_t.tokenWords)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f wittenbell (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e) alm.init(alm.smoothing_t.wittenBell)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043e\u0431\u0449\u0435\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043c\u044b\u0435 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (\u0421\u0428\u0410, \u0424\u0421\u0411, \u041a\u0413\u0411 ...) f = open('.\/abbrs\/abbrs.txt') for abbr in f.readlines():     abbr = abbr.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addAbbr(abbr) f.close()  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/whitelist\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addGoodword(word) f.close()  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/blacklist\/garbage.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addBadword(word) f.close()  def status(text, status):     print(text, status)  def statusWords(status):     print(&quot;Write words&quot;, status)  def statusVocab(status):     print(&quot;Write vocab&quot;, status)  def statusMap(status):     print(&quot;Write map&quot;, status)  def statusSuffix(status):     print(&quot;Write suffix&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.collectCorpus(&quot;.\/texts\/corpus&quot;, status) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 alm.writeWords(&quot;.\/output\/words.txt&quot;, statusWords) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.writeVocab(&quot;.\/output\/alm.vocab&quot;, statusVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.writeMap(&quot;.\/output\/alm.map&quot;, statusMap) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440 alm.writeSuffix(&quot;.\/output\/alm.abbr&quot;, statusSuffix) <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043a\u043e\u0440\u043f\u0443\u0441\u0430  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0443\u043d\u0438\u043d\u0433 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ALM<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>prune.json<\/b>  <\/p>\n<pre><code class=\"json\">{     &quot;size&quot;: 3,     &quot;debug&quot;: 1,     &quot;allow-unk&quot;: true,     &quot;method&quot;: &quot;vprune&quot;,     &quot;vprune-wltf&quot;: -15.0,     &quot;locale&quot;: &quot;en_US.UTF-8&quot;,     &quot;smoothing&quot;: &quot;wittenbell&quot;,     &quot;r-map&quot;: &quot;.\/corpus1\/alm.map&quot;,     &quot;r-vocab&quot;: &quot;.\/corpus1\/alm.vocab&quot;,     &quot;w-map&quot;: &quot;.\/output\/alm.map&quot;,     &quot;w-vocab&quot;: &quot;.\/output\/alm.vocab&quot;,     &quot;goodwords&quot;: &quot;.\/texts\/whitelist\/words.txt&quot;,     &quot;badwords&quot;: &quot;.\/texts\/blacklist\/garbage.txt&quot;,     &quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/alm -r-json .\/prune.json <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><b>size<\/b> \u2014 \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3<\/li>\n<li><b>debug<\/b> \u2014 \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0443\u043d\u0438\u043d\u0433\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>allow-unk<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u2329unk\u232a\u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>vprune-wltf<\/b> \u2014 \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e-\u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0439 \u0432\u0435\u0441 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 (\u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0438\u0436\u0435 \u2014 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f)<\/li>\n<li><b>locale<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c)<\/li>\n<li><b>smoothing<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f <b>wittenbell<\/b> (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e)<\/li>\n<li><b>r-map<\/b> \u2014 \u041a\u0430\u0440\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435<\/li>\n<li><b>r-vocab<\/b> \u2014 \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435<\/li>\n<li><b>w-map<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<li><b>w-vocab<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c<\/li>\n<li><b>goodwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>badwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>alphabet<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435)<\/li>\n<\/ul>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import alm  # \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3 alm.setSize(3) # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 alm.setThreads(0) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c) alm.setLocale(&quot;en_US.UTF-8&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) alm.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;)  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.setOption(alm.options_t.allowUnk)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f wittenbell (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e) alm.init(alm.smoothing_t.wittenBell)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/whitelist\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addGoodword(word) f.close()  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/blacklist\/garbage.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addBadword(word) f.close()  def statusPrune(status):     print(&quot;Prune data&quot;, status)  def statusReadVocab(text, status):     print(&quot;Read vocab&quot;, text, status)  def statusWriteVocab(status):     print(&quot;Write vocab&quot;, status)  def statusReadMap(text, status):     print(&quot;Read map&quot;, text, status)  def statusWriteMap(status):     print(&quot;Write map&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443\u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.readVocab(&quot;.\/corpus1\/alm.vocab&quot;, statusReadVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.readMap(&quot;.\/corpus1\/alm.map&quot;, statusReadMap) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u0443\u043d\u0438\u043d\u0433 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.pruneVocab(-15.0, 0, 0, statusPrune) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.writeVocab(&quot;.\/output\/alm.vocab&quot;, statusWriteVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.writeMap(&quot;.\/output\/alm.map&quot;, statusWriteMap) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ALM<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>merge.json<\/b>  <\/p>\n<pre><code class=\"json\">{     &quot;size&quot;: 3,     &quot;debug&quot;: 1,     &quot;allow-unk&quot;: true,     &quot;method&quot;: &quot;merge&quot;,     &quot;mixed-dicts&quot;: &quot;true&quot;,     &quot;locale&quot;: &quot;en_US.UTF-8&quot;,     &quot;smoothing&quot;: &quot;wittenbell&quot;,     &quot;r-words&quot;: &quot;.\/texts\/words&quot;,     &quot;r-map&quot;: &quot;.\/corpus1&quot;,     &quot;r-vocab&quot;: &quot;.\/corpus1&quot;,     &quot;w-map&quot;: &quot;.\/output\/alm.map&quot;,     &quot;w-vocab&quot;: &quot;.\/output\/alm.vocab&quot;,     &quot;goodwords&quot;: &quot;.\/texts\/whitelist\/words.txt&quot;,     &quot;badwords&quot;: &quot;.\/texts\/blacklist\/garbage.txt&quot;,     &quot;mix-restwords&quot;: &quot;.\/texts\/similars\/letters.txt&quot;,     &quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/alm -r-json .\/merge.json <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><b>size<\/b> \u2014 \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3<\/li>\n<li><b>debug<\/b> \u2014 \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li><b>allow-unk<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u2329unk\u232a\u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>mixed-dicts<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/li>\n<li><b>locale<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c)<\/li>\n<li><b>smoothing<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f <b>wittenbell<\/b> (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e)<\/li>\n<li><b>r-words<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u0441 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c<\/li>\n<li><b>r-map<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043a\u0430\u0440\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u043f\u0440\u0443\u043d\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>r-vocab<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u043f\u0440\u0443\u043d\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>w-map<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<li><b>w-vocab<\/b> \u2014 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c<\/li>\n<li><b>goodwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>badwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>alphabet<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435)<\/li>\n<\/ul>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import alm  # \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3 alm.setSize(3) # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 alm.setThreads(0) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c) alm.setLocale(&quot;en_US.UTF-8&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) alm.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.setOption(alm.options_t.allowUnk) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setOption(alm.options_t.mixDicts)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f wittenbell (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e) alm.init(alm.smoothing_t.wittenBell)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/whitelist\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addGoodword(word) f.close()  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/blacklist\/garbage.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addBadword(word) f.close()  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c f = open('.\/texts\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     alm.addWord(word) f.close()  def statusReadVocab(text, status):     print(&quot;Read vocab&quot;, text, status)  def statusWriteVocab(status):     print(&quot;Write vocab&quot;, status)  def statusReadMap(text, status):     print(&quot;Read map&quot;, text, status)  def statusWriteMap(status):     print(&quot;Write map&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.readVocab(&quot;.\/corpus1&quot;, statusReadVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.readMap(&quot;.\/corpus1&quot;, statusReadMap) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.writeVocab(&quot;.\/output\/alm.vocab&quot;, statusWriteVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.writeMap(&quot;.\/output\/alm.map&quot;, statusWriteMap) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ALM<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>train.json<\/b>  <\/p>\n<pre><code class=\"json\">{     &quot;size&quot;: 3,     &quot;debug&quot;: 1,     &quot;allow-unk&quot;: true,     &quot;reset-unk&quot;: true,     &quot;interpolate&quot;: true,     &quot;method&quot;: &quot;train&quot;,     &quot;locale&quot;: &quot;en_US.UTF-8&quot;,     &quot;smoothing&quot;: &quot;wittenbell&quot;,     &quot;r-map&quot;: &quot;.\/output\/alm.map&quot;,     &quot;r-vocab&quot;: &quot;.\/output\/alm.vocab&quot;,     &quot;w-arpa&quot;: &quot;.\/output\/alm.arpa&quot;,     &quot;w-words&quot;: &quot;.\/output\/words.txt&quot;,     &quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/alm -r-json .\/train.json <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><b>size<\/b> \u2014 \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3<\/li>\n<li><b>debug<\/b> \u2014 \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>allow-unk<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u2329unk\u232a\u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>reset-unk<\/b> \u2014 \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u0440\u043e\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u044b, \u0434\u043b\u044f\u2329unk\u232a\u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>interpolate<\/b> \u2014 \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e\u0442<\/li>\n<li><b>locale<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c)<\/li>\n<li><b>smoothing<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f <b>wittenbell<\/b><\/li>\n<li><b>r-map<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>r-vocab<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>w-arpa<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0444\u0430\u0439\u043b\u0430 ARPA, \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f<\/li>\n<li><b>w-words<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0444\u0430\u0439\u043b\u0430, \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439)<\/li>\n<li><b>alphabet<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435)<\/li>\n<\/ul>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import alm  # \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3 alm.setSize(3) # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 alm.setThreads(0) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c) alm.setLocale(&quot;en_US.UTF-8&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) alm.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.setOption(alm.options_t.allowUnk) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u0440\u043e\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u043e\u043a\u0435\u043d\u0430 &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.setOption(alm.options_t.resetUnk) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 alm.setOption(alm.options_t.mixDicts) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445 alm.setOption(alm.options_t.interpolate)  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f wittenbell (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e) alm.init(alm.smoothing_t.wittenBell)  def statusReadVocab(text, status):     print(&quot;Read vocab&quot;, text, status)  def statusReadMap(text, status):     print(&quot;Read map&quot;, text, status)  def statusBuildArpa(status):     print(&quot;Build ARPA&quot;, status)  def statusWriteMap(status):     print(&quot;Write map&quot;, status)  def statusWriteArpa(status):     print(&quot;Write ARPA&quot;, status)  def statusWords(status):     print(&quot;Write words&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.readVocab(&quot;.\/output\/alm.vocab&quot;, statusReadVocab) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 alm.readMap(&quot;.\/output\/alm.map&quot;, statusReadMap)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u0430\u0441\u0447\u0451\u0442\u044b \u0447\u0430\u0441\u0442\u043e\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 alm.buildArpa(statusBuildArpa)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b ARPA alm.writeArpa(&quot;.\/output\/alm.arpa&quot;, statusWriteArpa)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f alm.writeWords(&quot;.\/output\/words.txt&quot;, statusWords) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 spell-checker ASC<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>train.json<\/b>  <\/p>\n<pre><code class=\"json\">{ \t&quot;size&quot;: 3, \t&quot;debug&quot;: 1, \t&quot;threads&quot;: 0, \t&quot;confidence&quot;: true, \t&quot;mixed-dicts&quot;: true, \t&quot;method&quot;: &quot;train&quot;, \t&quot;alter&quot;: {&quot;\u0435&quot;:&quot;\u0451&quot;}, \t&quot;locale&quot;: &quot;en_US.UTF-8&quot;, \t&quot;smoothing&quot;: &quot;wittenbell&quot;, \t&quot;pilots&quot;: [&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;], \t&quot;w-bin&quot;: &quot;.\/dictionary\/3-single.asc&quot;, \t&quot;r-abbr&quot;: &quot;.\/output\/alm.abbr&quot;, \t&quot;r-vocab&quot;: &quot;.\/output\/alm.vocab&quot;, \t&quot;r-arpa&quot;: &quot;.\/output\/alm.arpa&quot;, \t&quot;abbrs&quot;: &quot;.\/texts\/abbrs\/abbrs.txt&quot;, \t&quot;goodwords&quot;: &quot;.\/texts\/whitelist\/words.txt&quot;, \t&quot;badwords&quot;: &quot;.\/texts\/blacklist\/garbage.txt&quot;, \t&quot;alters&quot;: &quot;.\/texts\/alters\/yoficator.txt&quot;, \t&quot;upwords&quot;: &quot;.\/texts\/words\/upp&quot;, \t&quot;mix-restwords&quot;: &quot;.\/texts\/similars\/letters.txt&quot;, \t&quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;, \t&quot;bin-code&quot;: &quot;ru&quot;, \t&quot;bin-name&quot;: &quot;Russian&quot;, \t&quot;bin-author&quot;: &quot;You name&quot;, \t&quot;bin-copyright&quot;: &quot;You company LLC&quot;, \t&quot;bin-contacts&quot;: &quot;site: https:\/\/example.com, e-mail: info@example.com&quot;, \t&quot;bin-lictype&quot;: &quot;MIT&quot;, \t&quot;bin-lictext&quot;: &quot;... License text ...&quot;, \t&quot;embedding-size&quot;: 28, \t&quot;embedding&quot;: { \t    &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5, \t    &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9, \t    &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14, \t    &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20, \t    &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22, \t    &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26, \t    &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26, \t    &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26, \t    &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27, \t    &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0, \t    &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3, \t    &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11, \t    &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15, \t    &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7 \t} } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/asc -r-json .\/train.json <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><b>size<\/b> \u2014 \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3<\/li>\n<li><b>debug<\/b> \u2014 \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/li>\n<li><b>threads<\/b> \u2014 \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430<\/li>\n<li><b>confidence<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 ARPA \u0442\u0430\u043a-\u043a\u0430\u043a \u043e\u043d\u0438 \u0435\u0441\u0442\u044c, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/li>\n<li><b>mixed-dicts<\/b> \u2014 \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/li>\n<li><b>alter<\/b> \u2014 \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b (\u0431\u0443\u043a\u0432\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043c\u0435\u0449\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u0443\u043a\u0432\u044b \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e \u2014 \u0431\u0443\u043a\u0432\u0430 <b>\u00ab\u0401\u00bb<\/b>)<\/li>\n<li><b>locale<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c)<\/li>\n<li><b>smoothing<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f <b>wittenbell<\/b> (\u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e)<\/li>\n<li><b>pilots<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0438\u043b\u043e\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u0441\u043b\u043e\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b)<\/li>\n<li><b>w-bin<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/li>\n<li><b>r-abbr<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>r-vocab<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445<\/li>\n<li><b>r-arpa<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b ARPA, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435<\/li>\n<li><b>abbrs<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043e\u0431\u0449\u0435\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043c\u044b\u0435 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (\u0421\u0428\u0410, \u0424\u0421\u0411, \u041a\u0413\u0411 &#8230;)<\/li>\n<li><b>goodwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>badwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432<\/li>\n<li><b>alters<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e (\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0444\u0430\u0439\u043b\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d <a href=\"https:\/\/github.com\/anyks\/asc#file-containing-similar-letters-encountered-in-different-dictionaries\" rel=\"nofollow\">\u0441\u043f\u0438\u0441\u043a\u0443 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0431\u0443\u043a\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430\u0445<\/a>)<\/li>\n<li><b>upwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u0430, \u0444\u0430\u043c\u0438\u043b\u0438\u0438&#8230;)<\/li>\n<li><b>mix-restwords<\/b> \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b <a href=\"https:\/\/github.com\/anyks\/alm#file-of-similar-letters-in-different-dictionaries\" rel=\"nofollow\">\u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432<\/a><\/li>\n<li><b>alphabet<\/b> \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435)<\/li>\n<li><b>bin-code<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435<\/li>\n<li><b>bin-name<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>bin-author<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>bin-copyright<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>bin-contacts<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>bin-lictype<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>bin-lictext<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f<\/li>\n<li><b>embedding-size<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430<\/li>\n<li><b>embedding<\/b> \u2014 \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u043b\u043e\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430 (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432)<\/li>\n<\/ul>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import asc  # \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c N-\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u0438\u043d\u043e\u0439 3 asc.setSize(3) # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 asc.setThreads(0) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c) asc.setLocale(&quot;en_US.UTF-8&quot;)  # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0443 \u0441\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 asc.setOption(asc.options_t.uppers) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 asc.setOption(asc.options_t.allowUnk) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u0440\u043e\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u043e\u043a\u0435\u043d\u0430 &lt;unk&gt; \u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 asc.setOption(asc.options_t.resetUnk) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 asc.setOption(asc.options_t.mixDicts) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 ARPA \u0442\u0430\u043a-\u043a\u0430\u043a \u043e\u043d\u0438 \u0435\u0441\u0442\u044c, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438 asc.setOption(asc.options_t.confidence)  # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) asc.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0438\u043b\u043e\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u0441\u043b\u043e\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b) asc.setPilots([&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;]) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 asc.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/whitelist\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addGoodword(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/blacklist\/garbage.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addBadword(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440 f = open('.\/output\/alm.abbr') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addSuffix(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0431\u0449\u0435\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043c\u044b\u0435 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (\u0421\u0428\u0410, \u0424\u0421\u0411, \u041a\u0413\u0411 ...) f = open('.\/texts\/abbrs\/abbrs.txt') for abbr in f.readlines():     abbr = abbr.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addAbbr(abbr) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u0430, \u0444\u0430\u043c\u0438\u043b\u0438\u0438...) f = open('.\/texts\/words\/upp\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addUWord(word) f.close()  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0443\u043a\u0432\u0443 asc.addAlt(&quot;\u0435&quot;, &quot;\u0451&quot;)  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e (\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0444\u0430\u0439\u043b\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0441\u043f\u0438\u0441\u043a\u0443 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0431\u0443\u043a\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430\u0445) f = open('.\/texts\/alters\/yoficator.txt') for words in f.readlines():     words = words.replace(&quot;\\n&quot;, &quot;&quot;)     words = words.split('\\t')     asc.addAlt(words[0], words[1]) f.close()  def statusIndex(text, status):     print(text, status)  def statusBuildIndex(status):     print(&quot;Build index&quot;, status)  def statusArpa(status):     print(&quot;Read arpa&quot;, status)  def statusVocab(status):     print(&quot;Read vocab&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 ARPA asc.readArpa(&quot;.\/output\/alm.arpa&quot;, statusArpa) # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.readVocab(&quot;.\/output\/alm.vocab&quot;, statusVocab)  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 asc.setCode(&quot;RU&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setLictype(&quot;MIT&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setName(&quot;Russian&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setAuthor(&quot;You name&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setCopyright(&quot;You company LLC&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setLictext(&quot;... License text ...&quot;) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.setContacts(&quot;site: https:\/\/example.com, e-mail: info@example.com&quot;)  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u043b\u043e\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430 (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432) asc.setEmbedding({     &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5,     &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9,     &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14,     &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20,     &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22,     &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26,     &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26,     &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26,     &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27,     &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0,     &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3,     &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11,     &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15,     &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7 }, 28)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.buildIndex(statusBuildIndex)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.saveIndex(&quot;.\/dictionary\/3-middle.asc&quot;, &quot;&quot;, 128, statusIndex) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u042f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043d\u0430 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u044b \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 <a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\"><b>ASC<\/b><\/a> \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u043b\u0438\u0448\u044c \u0444\u0430\u0439\u043b\u043e\u043c <b>ARPA<\/b> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/b>                         <\/p>\n<div class=\"spoiler_text\"><b>spell.json<\/b>  <\/p>\n<pre><code class=\"json\">{     &quot;ad&quot;: 13,     &quot;cw&quot;: 38120,     &quot;debug&quot;: 1,     &quot;threads&quot;: 0,     &quot;method&quot;: &quot;spell&quot;,     &quot;alter&quot;: {&quot;\u0435&quot;:&quot;\u0451&quot;},     &quot;asc-split&quot;: true,     &quot;asc-alter&quot;: true,     &quot;confidence&quot;: true,     &quot;asc-esplit&quot;: true,     &quot;asc-rsplit&quot;: true,     &quot;asc-uppers&quot;: true,     &quot;asc-hyphen&quot;: true,     &quot;mixed-dicts&quot;: true,     &quot;asc-wordrep&quot;: true,     &quot;spell-verbose&quot;: true,     &quot;r-text&quot;: &quot;.\/texts\/test.txt&quot;,     &quot;w-text&quot;: &quot;.\/texts\/output.txt&quot;,     &quot;upwords&quot;: &quot;.\/texts\/words\/upp&quot;,     &quot;r-arpa&quot;: &quot;.\/dictionary\/alm.arpa&quot;,     &quot;r-abbr&quot;: &quot;.\/dictionary\/alm.abbr&quot;,     &quot;abbrs&quot;: &quot;.\/texts\/abbrs\/abbrs.txt&quot;,     &quot;alters&quot;: &quot;.\/texts\/alters\/yoficator.txt&quot;,     &quot;mix-restwords&quot;: &quot;.\/similars\/letters.txt&quot;,     &quot;goodwords&quot;: &quot;.\/texts\/whitelist\/words.txt&quot;,     &quot;badwords&quot;: &quot;.\/texts\/blacklist\/garbage.txt&quot;,     &quot;pilots&quot;: [&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;],     &quot;alphabet&quot;: &quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;,     &quot;embedding-size&quot;: 28,     &quot;embedding&quot;: {         &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5,         &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9,         &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14,         &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20,         &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22,         &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26,         &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26,         &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26,         &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27,         &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0,         &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3,         &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11,         &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15,         &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/asc -r-json .\/spell.json <\/code><\/pre>\n<p>  <b>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Python<\/b>  <\/p>\n<pre><code class=\"python\">import asc  # \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 asc.setThreads(0) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0443 \u0441\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 asc.setOption(asc.options_t.uppers) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043f\u043b\u0438\u0442\u044b asc.setOption(asc.options_t.ascSplit) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0401\u0444\u0438\u043a\u0430\u0446\u0438\u044e asc.setOption(asc.options_t.ascAlter) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043f\u043b\u0438\u0442 \u0441\u043b\u043e\u0432 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 asc.setOption(asc.options_t.ascESplit) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 asc.setOption(asc.options_t.ascRSplit) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0441\u043b\u043e\u0432 asc.setOption(asc.options_t.ascUppers) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043f\u043b\u0438\u0442 \u043f\u043e \u0434\u0435\u0444\u0438\u0441\u0430\u043c asc.setOption(asc.options_t.ascHyphen) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u043b\u043e\u0432\u0430 asc.setOption(asc.options_t.ascWordRep) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0437\u0430\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 asc.setOption(asc.options_t.mixDicts) # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 ARPA \u0442\u0430\u043a-\u043a\u0430\u043a \u043e\u043d\u0438 \u0435\u0441\u0442\u044c, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438 asc.setOption(asc.options_t.confidence)  # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 (\u0430\u043b\u0444\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435) asc.setAlphabet(&quot;\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044fabcdefghijklmnopqrstuvwxyz&quot;) # \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0438\u043b\u043e\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u0441\u043b\u043e\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b) asc.setPilots([&quot;\u0430&quot;,&quot;\u0443&quot;,&quot;\u0432&quot;,&quot;\u043e&quot;,&quot;\u0441&quot;,&quot;\u043a&quot;,&quot;\u0431&quot;,&quot;\u0438&quot;,&quot;\u044f&quot;,&quot;\u044d&quot;,&quot;a&quot;,&quot;i&quot;,&quot;o&quot;,&quot;e&quot;,&quot;g&quot;]) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 asc.setSubstitutes({'p':'\u0440','c':'\u0441','o':'\u043e','t':'\u0442','k':'\u043a','e':'\u0435','a':'\u0430','h':'\u043d','x':'\u0445','b':'\u0432','m':'\u043c'})  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/whitelist\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addGoodword(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0451\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432 f = open('.\/texts\/blacklist\/garbage.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addBadword(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440 f = open('.\/output\/alm.abbr') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addSuffix(word) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0431\u0449\u0435\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043c\u044b\u0435 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (\u0421\u0428\u0410, \u0424\u0421\u0411, \u041a\u0413\u0411 ...) f = open('.\/texts\/abbrs\/abbrs.txt') for abbr in f.readlines():     abbr = abbr.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addAbbr(abbr) f.close()  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u0430, \u0444\u0430\u043c\u0438\u043b\u0438\u0438...) f = open('.\/texts\/words\/upp\/words.txt') for word in f.readlines():     word = word.replace(&quot;\\n&quot;, &quot;&quot;)     asc.addUWord(word) f.close()  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0443\u043a\u0432\u0443 asc.addAlt(&quot;\u0435&quot;, &quot;\u0451&quot;)  # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e (\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0444\u0430\u0439\u043b\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0441\u043f\u0438\u0441\u043a\u0443 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0431\u0443\u043a\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430\u0445) f = open('.\/texts\/alters\/yoficator.txt') for words in f.readlines():     words = words.replace(&quot;\\n&quot;, &quot;&quot;)     words = words.split('\\t')     asc.addAlt(words[0], words[1]) f.close()  def statusArpa(status):     print(&quot;Read arpa&quot;, status)  def statusIndex(status):     print(&quot;Build index&quot;, status)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 ARPA asc.readArpa(&quot;.\/dictionary\/alm.arpa&quot;, statusArpa)  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f (38120 \u0441\u043b\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 13 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438) asc.setAdCw(38120, 13)  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u043b\u043e\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0430 (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432) asc.setEmbedding({     &quot;\u0430&quot;: 0, &quot;\u0431&quot;: 1, &quot;\u0432&quot;: 2, &quot;\u0433&quot;: 3, &quot;\u0434&quot;: 4, &quot;\u0435&quot;: 5,     &quot;\u0451&quot;: 5, &quot;\u0436&quot;: 6, &quot;\u0437&quot;: 7, &quot;\u0438&quot;: 8, &quot;\u0439&quot;: 8, &quot;\u043a&quot;: 9,     &quot;\u043b&quot;: 10, &quot;\u043c&quot;: 11, &quot;\u043d&quot;: 12, &quot;\u043e&quot;: 0, &quot;\u043f&quot;: 13, &quot;\u0440&quot;: 14,     &quot;\u0441&quot;: 15, &quot;\u0442&quot;: 16, &quot;\u0443&quot;: 17, &quot;\u0444&quot;: 18, &quot;\u0445&quot;: 19, &quot;\u0446&quot;: 20,     &quot;\u0447&quot;: 21, &quot;\u0448&quot;: 21, &quot;\u0449&quot;: 21, &quot;\u044a&quot;: 22, &quot;\u044b&quot;: 23, &quot;\u044c&quot;: 22,     &quot;\u044d&quot;: 5, &quot;\u044e&quot;: 24, &quot;\u044f&quot;: 25, &quot;&lt;&quot;: 26, &quot;&gt;&quot;: 26, &quot;~&quot;: 26,     &quot;-&quot;: 26, &quot;+&quot;: 26, &quot;=&quot;: 26, &quot;*&quot;: 26, &quot;\/&quot;: 26, &quot;:&quot;: 26,     &quot;%&quot;: 26, &quot;|&quot;: 26, &quot;^&quot;: 26, &quot;&amp;&quot;: 26, &quot;#&quot;: 26, &quot;'&quot;: 26,     &quot;\\\\&quot;: 26, &quot;0&quot;: 27, &quot;1&quot;: 27, &quot;2&quot;: 27, &quot;3&quot;: 27, &quot;4&quot;: 27,     &quot;5&quot;: 27, &quot;6&quot;: 27, &quot;7&quot;: 27, &quot;8&quot;: 27, &quot;9&quot;: 27, &quot;a&quot;: 0,     &quot;b&quot;: 2, &quot;c&quot;: 15, &quot;d&quot;: 4, &quot;e&quot;: 5, &quot;f&quot;: 18, &quot;g&quot;: 3,     &quot;h&quot;: 12, &quot;i&quot;: 8, &quot;j&quot;: 6, &quot;k&quot;: 9, &quot;l&quot;: 10, &quot;m&quot;: 11,     &quot;n&quot;: 12, &quot;o&quot;: 0, &quot;p&quot;: 14, &quot;q&quot;: 13, &quot;r&quot;: 14, &quot;s&quot;: 15,     &quot;t&quot;: 16, &quot;u&quot;: 24, &quot;v&quot;: 21, &quot;w&quot;: 22, &quot;x&quot;: 19, &quot;y&quot;: 17, &quot;z&quot;: 7 }, 28)  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f asc.buildIndex(statusIndex)  f1 = open('.\/texts\/test.txt') f2 = open('.\/texts\/output.txt', 'w')  for line in f1.readlines():     res = asc.spell(line)     f2.write(&quot;%s\\n&quot; % res[0])  f2.close() f1.close() <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <b>P.S.<\/b> \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u043e\u0431\u0443\u0447\u0430\u0442\u044c, \u044f \u043f\u043e\u0434\u043d\u044f\u043b <a href=\"https:\/\/anyks.com\/spell-checker\/index.html\" rel=\"nofollow\">web \u0432\u0435\u0440\u0441\u0438\u044e <b>ASC<\/b><\/a>. \u041d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0437\u043d\u0430\u044e\u0449\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0432\u0435\u0441\u044c \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b <a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\"><b>ASC<\/b><\/a> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/div>\n<p> \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\/519854\/\"> https:\/\/habr.com\/ru\/post\/519854\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/519854\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6x\/xb\/4g\/6xxb4gv7y-hbpplohsmhxvgduii.jpeg\" alt=\"image\"><\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u044d\u0442\u043e \u043c\u043e\u044f \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u0440\u0430\u043d\u0435\u0435 \u044f \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u043e <a href=\"https:\/\/habr.com\/ru\/post\/499064\"><b>\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 ALM<\/b><\/a>. \u0421\u0435\u0439\u0447\u0430\u0441, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a <a href=\"https:\/\/github.com\/anyks\/asc\" rel=\"nofollow\"><b>ASC<\/b><\/a> (\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/anyks\/alm\" rel=\"nofollow\"><b>ALM<\/b><\/a>).<\/p>\n<p>  \u0414\u0430, \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u044f \u043c\u043e\u0433\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e <a href=\"https:\/\/github.com\/bakwc\/JamSpell\" rel=\"nofollow\"><b>JamSpell<\/b><\/a>, \u0441 \u043d\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c. \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442 <a href=\"http:\/\/docs.deeppavlov.ai\/en\/master\/features\/models\/spelling_correction.html\" rel=\"nofollow\"><b>DeepPavlov<\/b><\/a>, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043d\u043e \u044f \u0441 \u043d\u0435\u0439 \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u043b\u0441\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310207","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310207","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=310207"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310207\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}