{"id":290398,"date":"2018-10-05T20:50:02","date_gmt":"2018-10-05T16:50:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290398"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290398","title":{"rendered":"\u041f\u0430\u0440\u0441\u0438\u043c \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 NLP \u0432 4 \u043a\u043e\u043c\u0430\u043d\u0434\u044b"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<h1 id=\"parsim-vikipediyu-dlya-zadach-nlp-v-4-komandy\"><strong>\u041f\u0430\u0440\u0441\u0438\u043c \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 NLP \u0432 4 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/strong><\/h1>\n<p>  <\/p>\n<h1 id=\"sut\"><strong>\u0421\u0443\u0442\u044c<\/strong><\/h1>\n<p>  <\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443c\u0442\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<p>  <\/p>\n<pre><code>git clone https:\/\/github.com\/attardi\/wikiextractor.git cd wikiextractor wget http:\/\/dumps.wikimedia.org\/ruwiki\/latest\/ruwiki-latest-pages-articles.xml.bz2 python3 WikiExtractor.py -o ..\/data\/wiki\/ --no-templates --processes 8 ..\/data\/ruwiki-latest-pages-articles.xml.bz2<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u043e\u0442\u043e\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/gist.github.com\/snakers4\/e0b0e68904db65671ca979639b337f7b\"><strong>\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c<\/strong><\/a> \u0434\u043b\u044f \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430<\/p>\n<p>  <\/p>\n<pre><code>python3 process_wikipedia.py<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 <code>.csv<\/code> \u0444\u0430\u0439\u043b \u0441 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u043c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>http:\/\/dumps.wikimedia.org\/ruwiki\/latest\/ruwiki-latest-pages-articles.xml.bz2<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u0432\u0430\u043c \u044f\u0437\u044b\u043a, \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0442\u0443\u0442 <a href=\"https:\/\/dumps.wikimedia.org\/backup-index.html\"><strong>[4]<\/strong><\/a>;<\/li>\n<li>\u0412\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 <code>wikiextractor<\/code> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u0435 (\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0430 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0430\u0441\u044c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043c\u0430\u043d\u0430);<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u043e\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0438\u043a\u0438 \u0444\u0430\u0439\u043b\u044b \u0432 \u0442\u0430\u043a\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<p>  <\/p>\n<table>\n<thead>\n<tr>\n<th>idx<\/th>\n<th>article_uuid<\/th>\n<th>sentence<\/th>\n<th>cleaned sentence<\/th>\n<th>cleaned sentence length<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>74fb822b-54bb-4bfb-95ef-4eac9465c7d7<\/td>\n<td>\u0416\u0430\u043d I \u0434\u0435 \u0428\u0430\u0442\u0438\u043b\u044c\u043e\u043d (\u0433\u0440\u0430\u0444 \u0434\u0435 \u041f\u0435\u043d\u0442\u044c\u0435\u0432\u0440)\u0416\u0430\u043d I \u0434\u0435 \u0428&#8230;<\/td>\n<td>\u0436\u0430\u043d i \u0434\u0435 \u0448\u0430\u0442\u0438\u043b\u044c\u043e\u043d \u0433\u0440\u0430\u0444 \u0434\u0435 \u043f\u0435\u043d\u0442\u044c\u0435\u0432\u0440 \u0436\u0430\u043d i \u0434\u0435 \u0448\u0430&#8230;<\/td>\n<td>38<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>74fb822b-54bb-4bfb-95ef-4eac9465c7d7<\/td>\n<td>\u041d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u043e\u0439 \u0420\u043e\u0431\u0435\u0440\u0442\u0430 \u0434\u0435 \u0412\u0435\u0440\u0430, \u0433\u0440\u0430\u0444\u0430 \u041e&#8230;<\/td>\n<td>\u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f \u043e\u0445\u0440\u0430\u043d\u043e\u0439 \u0440\u043e\u0431\u0435\u0440\u0442\u0430 \u0434\u0435 \u0432\u0435\u0440\u0430 \u0433\u0440\u0430\u0444\u0430 \u043e\u043a\u0441\u0444\u043e\u0440&#8230;<\/td>\n<td>18<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>74fb822b-54bb-4bfb-95ef-4eac9465c7d7<\/td>\n<td>\u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u0440\u043e\u0442\u0438\u0432\u0438\u043b\u0441\u044f \u0413\u0435\u043d\u0440\u0438 \u0434\u0435 \u0413\u0440\u043e\u043c\u043e\u043d, \u0433\u0440&#8230;<\/td>\n<td>\u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u0440\u043e\u0442\u0438\u0432\u0438\u043b\u0441\u044f \u0433\u0435\u043d\u0440\u0438 \u0434\u0435 \u0433\u0440\u043e\u043c\u043e\u043d \u0433\u0440\u0430&#8230;<\/td>\n<td>14<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>74fb822b-54bb-4bfb-95ef-4eac9465c7d7<\/td>\n<td>\u041a\u043e\u0440\u043e\u043b\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0435\u043c\u0443 \u0432 \u0436\u0451\u043d\u044b \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u043e\u0441\u043e\u0431&#8230;<\/td>\n<td>\u043a\u043e\u0440\u043e\u043b\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0436\u0451\u043d\u044b \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u043e\u0441\u043e\u0431\u0443 \u0444\u0438\u043b\u0438&#8230;<\/td>\n<td>48<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>74fb822b-54bb-4bfb-95ef-4eac9465c7d7<\/td>\n<td>\u0416\u0430\u043d \u0431\u044b\u043b \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0451\u043d \u0438 \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u0432\u043e \u0424\u0440\u0430\u043d\u0446\u0438\u044e \u0432 138&#8230;<\/td>\n<td>\u0436\u0430\u043d \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0451\u043d \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u0444\u0440\u0430\u043d\u0446\u0438\u044e \u0433\u043e\u0434\u0443 \u0441\u0432\u0430\u0434\u044c\u0431\u0430 \u043c&#8230;<\/td>\n<td>52<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <\/p>\n<p>article_uuid \u2014 \u043f\u0441\u0435\u0432\u0434\u043e-\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0438\u0434\u0435\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430.<\/p>\n<p>  <\/p>\n<h1 id=\"zachem\"><strong>\u0417\u0430\u0447\u0435\u043c<\/strong><\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 ML-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f [8], \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 NLP \u043c\u043e\u0434\u0435\u043b\u0438 \/ \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043f\u0430\u0440\u044b \u0434\u043d\u0435\u0439. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \/ \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432\/ \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0426\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u0431\u043e\u043b\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u0432, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0439 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 (\u043f\u043e \u0438\u0434\u0435\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0441\u043b\u043e\u0432 \u0432 NLP) \u0445\u0432\u0430\u0442\u0438\u0442 \u0438 \u043f\u0430\u0440\u044b \u0447\u0430\u0441\u043e\u0432. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0430\u0440\u044b \u0434\u043d\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0437\u0430\u0447\u0435\u043c \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438?<\/p>\n<p>  <\/p>\n<h1 id=\"princip-raboty-skripta\"><strong>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/strong><\/h1>\n<p>  <\/p>\n<p><code>wikiExtractor<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0437 \u0412\u0438\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e <code>&lt;doc&gt;<\/code> \u0431\u043b\u043e\u043a\u0430\u043c\u0438. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043b\u0435\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0411\u0435\u0440\u0451\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435;<\/li>\n<li>\u0414\u0435\u043b\u0438\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u0438;<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f HTML \u0442\u0435\u0433\u0438 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b;<\/li>\n<li>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>nltk.sent_tokenize<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u043d\u0435 \u0440\u0430\u0437\u0440\u043e\u0441\u0441\u044f \u0434\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c, \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439 uuid;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u043e (\u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u043b\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f):<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b;<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432\u0430;<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"dataset-est-chto-teper\"><strong>\u0414\u0430\u0442\u0430\u0441\u0435\u0442 \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c?<\/strong><\/h1>\n<p>  <\/p>\n<h2 id=\"osnovnoe-primenenie\"><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/strong><\/h2>\n<p>  <\/p>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432 NLP \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: :<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \/ \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043b\u043e\u0432 [6];<\/li>\n<li>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f CNN, \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043a\u0430\u043a, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u043b\u044c\u0448\u0438\u0432\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \/ \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \/ \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f [7];<\/li>\n<li>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e [9], \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0431\u0435\u0439\u0441\u043b\u0430\u0439\u043d\u0430 \u0434\u043b\u044f \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u044b\u0435 (\u0441 \u043f\u0430\u0440\u043e\u0439 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043f\u0443\u0441\u0442\u0438\u043c) \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u043b\u043e\u0432.<\/p>\n<p>  <\/p>\n<h2 id=\"drugie-varianty-ispolzovaniya\"><strong>\u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0412\u0438\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u043b\u044f triplet loss-\u0430;<\/li>\n<li>\u041e\u0431\u0443\u0447\u0430\u0435\u043c \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u044b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u043b\u044c\u0448\u0438\u0432\u044b\u0445 \u0444\u0440\u0430\u0437 [10];<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"nemnogo-grafikov-dlya-russkoy-viki\"><strong>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u0412\u0438\u043a\u0438<\/strong><\/h1>\n<p>  <\/p>\n<p><strong>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0420\u0443\u0441\u0441\u043a\u043e\u0439 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/strong><\/p>\n<p>  <\/p>\n<p><strong>\u0411\u0435\u0437 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u043e\u0432 (\u043f\u043e \u043e\u0441\u0438 X \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0447\u0438\u0441\u043b\u043e\u043c 20)<\/strong><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2ae\/6c2\/81f\/2ae6c281f87f81c49abdc2e72aba4206.png\"><\/p>\n<p>  <\/p>\n<p><strong>\u0412 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430\u0445<\/strong><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d31\/091\/a57\/d31091a573d3a39b60158cc148fb00fe.png\"><\/p>\n<p>  <\/p>\n<h1 id=\"ssylki\"><strong>\u0421\u0441\u044b\u043b\u043a\u0438<\/strong><\/h1>\n<p>  <\/p>\n<ol>\n<li>Fast-text <a href=\"https:\/\/fasttext.cc\/docs\/en\/pretrained-vectors.html\">\u0432\u0435\u043a\u0442\u043e\u0440\u044b<\/a> \u0441\u043b\u043e\u0432, \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0412\u0438\u043a\u0438;<\/li>\n<li>Fast-text \u0438 Word2Vec <a href=\"http:\/\/rusvectores.org\/ru\/models\/\">\u043c\u043e\u0434\u0435\u043b\u0438<\/a> \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430;<\/li>\n<li>\u041f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0430\u044f wiki extractor <a href=\"https:\/\/github.com\/attardi\/wikiextractor.git\">\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/a> \u0434\u043b\u044f \u043f\u0438\u0442\u043e\u043d\u0430;<\/li>\n<li>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f <a href=\"https:\/\/dumps.wikimedia.org\/backup-index.html\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/a> \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0412\u0438\u043a\u0438;<\/li>\n<li>\u041d\u0430\u0448 <a href=\"https:\/\/gist.github.com\/snakers4\/e0b0e68904db65671ca979639b337f7b\">\u0441\u043a\u0440\u0438\u043f\u0442<\/a> \u0434\u043b\u044f \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430;<\/li>\n<li>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043b\u043e\u0432: <a href=\"http:\/\/arxiv.org\/abs\/1607.04606\">Word2Vec<\/a>, <a href=\"http:\/\/arxiv.org\/abs\/1712.09405\">Fast-Text<\/a>, <a href=\"http:\/\/arxiv.org\/abs\/1802.06893\">\u0442\u044e\u043d\u0438\u043d\u0433<\/a>;<\/li>\n<li>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 SOTA \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:<br \/> \n<ol>\n<li><a href=\"http:\/\/arxiv.org\/abs\/1705.02364\">InferSent<\/a>;<\/li>\n<li>Generative <a href=\"https:\/\/blog.openai.com\/language-unsupervised\/\">pre-training<\/a> CNN;<\/li>\n<li><a href=\"http:\/\/arxiv.org\/abs\/1801.06146\">ULMFiT<\/a>;<\/li>\n<li>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f <a href=\"http:\/\/arxiv.org\/abs\/1802.05365\">\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a> \u0441\u043b\u043e\u0432 (Elmo);<\/li>\n<\/ol>\n<\/li>\n<li>Imagenet moment \u0432 <a href=\"https:\/\/thegradient.pub\/nlp-imagenet\/\">NLP<\/a>?<\/li>\n<li>\u0411\u0435\u0439\u0441\u043b\u0430\u0439\u043d\u044b \u0434\u043b\u044f \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <a href=\"https:\/\/openreview.net\/pdf?id=SyK00v5xx\">1<\/a>, <a href=\"http:\/\/nlp.town\/blog\/sentence-similarity\/\">2<\/a>, <a href=\"https:\/\/arxiv.org\/abs\/1806.06259\">3<\/a>, <a href=\"http:\/\/www.offconvex.org\/2018\/09\/18\/alacarte\/\">4<\/a>;<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/arxiv.org\/abs\/1808.03840\">\u0444\u0430\u043b\u044c\u0448\u0438\u0432\u044b\u0445 \u0444\u0440\u0430\u0437<\/a> \u0434\u043b\u044f \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/li>\n<\/ol>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/425507\/\"> https:\/\/habr.com\/post\/425507\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<h1 id=\"parsim-vikipediyu-dlya-zadach-nlp-v-4-komandy\"><strong>\u041f\u0430\u0440\u0441\u0438\u043c \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 NLP \u0432 4 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/strong><\/h1>\n<p>  <\/p>\n<h1 id=\"sut\"><strong>\u0421\u0443\u0442\u044c<\/strong><\/h1>\n<p>  <\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443c\u0442\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<p>  <\/p>\n<pre><code>git clone https:\/\/github.com\/attardi\/wikiextractor.git cd wikiextractor wget http:\/\/dumps.wikimedia.org\/ruwiki\/latest\/ruwiki-latest-pages-articles.xml.bz2 python3 WikiExtractor.py -o ..\/data\/wiki\/ --no-templates --processes 8 ..\/data\/ruwiki-latest-pages-articles.xml.bz2<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438 \u043f\u043e\u0442\u043e\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/gist.github.com\/snakers4\/e0b0e68904db65671ca979639b337f7b\"><strong>\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c<\/strong><\/a> \u0434\u043b\u044f \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430<\/p>\n<p>  <\/p>\n<pre><code>python3 process_wikipedia.py<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 <code>.csv<\/code> \u0444\u0430\u0439\u043b \u0441 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u043c.<\/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-290398","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290398","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=290398"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290398\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}