{"id":260840,"date":"2015-07-07T12:27:04","date_gmt":"2015-07-07T08:27:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=260840"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=260840","title":{"rendered":"\u0410\u043d\u0430\u043b\u0438\u0437 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439 \u0432 Twitter: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043d\u0430 R"},"content":{"rendered":"<p>       \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (Twitter, Facebook, LinkedIn) \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u044b\u0441\u043b\u0435\u0439 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u0432\u043e\u0434\u0430\u043c. \u041c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0442\u0432\u0438\u0442\u043e\u0432 (\u043f\u043e\u0441\u0442\u043e\u0432) \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u2014 \u0442\u0430\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, Twitter \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0435\u043b, \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433. Twitter \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433. \u0422\u0430\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439. \u041c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c twitter-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0438\u0445 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <i>\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/i>. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u043b\u043e\u0432. \u042d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043c\u043d\u0435\u043d\u0438\u0438 \u0438 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439. \u041c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0445 \u043c\u043d\u0435\u043d\u0438\u0435 (\u0442\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432) \u0432\u0437\u044f\u0442 \u0438\u0437 <a href=\"http:\/\/www.cs.uic.edu\/~liub\/FBS\/sentiment-analysis.html#lexicon\">\u0425\u044c\u044e \u0438 \u041b\u044c\u044e, KDD-2004<\/a>.<\/p>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 R \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c <code>twitteR, dplyr, stringr, ggplot2, tm, SnowballC, qdap<\/code> \u0438 <code>wordcloud<\/code>. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>install.packages()<\/code> \u0438 <code>library()<\/code>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Twitter API<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u2014 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/dev.twitter.com\/\">\u043f\u043e\u0440\u0442\u0430\u043b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u043b\u044f Twitter<\/a> \u0438 \u043f\u0440\u043e\u0439\u0442\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e. \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f:  <\/p>\n<pre><code class=\"html\">api_key = &quot;\u0412\u0430\u0448 \u043a\u043b\u044e\u0447 API&quot; api_secret = &quot;\u0412\u0430\u0448 api_secret \u043f\u0430\u0440\u043e\u043b\u044c&quot; access_token = &quot;\u0412\u0430\u0448 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430&quot; access_token_secret = &quot;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430&quot; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Twitter API:  <\/p>\n<pre><code class=\"diff\">setup_twitter_oauth(api_key,api_secret,access_token,access_token_secret) <\/code><\/pre>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439<\/h4>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 (\u0441\u043b\u043e\u0432\u0430\u0440\u044c) \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043f\u0430\u043f\u043a\u0443 R. \u0421\u043b\u043e\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, <code>positive<\/code> \u0438 <code>negative<\/code>, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.  <\/p>\n<pre><code class=\"python\">positive=scan('positive-words.txt',what='character',comment.char=';') negative=scan('negative-words.txt',what='character',comment.char=';') positive[20:30] <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">##  [1] &quot;accurately&quot;   &quot;achievable&quot;   &quot;achievement&quot;  &quot;achievements&quot; ##  [5] &quot;achievible&quot;   &quot;acumen&quot;       &quot;adaptable&quot;    &quot;adaptive&quot;     ##  [9] &quot;adequate&quot;     &quot;adjustable&quot;   &quot;admirable&quot; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">negative[500:510] <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">##  [1] &quot;byzantine&quot;    &quot;cackle&quot;       &quot;calamities&quot;   &quot;calamitous&quot;   ##  [5] &quot;calamitously&quot; &quot;calamity&quot;     &quot;callous&quot;      &quot;calumniate&quot;   ##  [9] &quot;calumniation&quot; &quot;calumnies&quot;    &quot;calumnious&quot; <\/code><\/pre>\n<p>  \u0412\u0441\u0435\u0433\u043e 2006 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 4783 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430. \u0420\u0430\u0437\u0434\u0435\u043b \u0432\u044b\u0448\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043b\u043e\u0432 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u043d\u043e\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u0430 \u043d\u0438\u0436\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u043e\u0432\u043e <code>cloud<\/code> \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c <code>positive<\/code> \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f <code>negative<\/code>.  <\/p>\n<pre><code class=\"python\">positive=c(positive,&quot;cloud&quot;) negative=negative[negative!=&quot;cloud&quot;] <\/code><\/pre>\n<h4>\u041f\u043e\u0438\u0441\u043a \u043f\u043e twitter-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c<\/h4>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e twitter-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, <code>findfd<\/code>. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0432\u0438\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, <code>number<\/code>. \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c.   <\/p>\n<pre><code class=\"python\">findfd= &quot;CyberSecurity&quot; number= 5000 <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u00abCyberSecurity\u00bb \u0438 5000 \u0442\u0432\u0438\u0442\u043e\u0432. \u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e twitter:  <\/p>\n<pre><code class=\"python\">tweet=searchTwitter(findfd,number) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## Time difference of 1.301408 mins <\/code><\/pre>\n<h5>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0442\u0432\u0438\u0442\u043e\u0432<\/h5>\n<p>  \u0423 \u0442\u0432\u0438\u0442\u043e\u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>gettext()<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>tweetT<\/code>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c 5000 \u0442\u0432\u0438\u0442\u043e\u0432. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u044f\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.  <\/p>\n<pre><code class=\"python\">tweetT=lapply(tweet,function(t)t$getText()) head(tweetT,5) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## [[1]] ## [1] &quot;RT @PCIAA: \\&quot;You must have realtime technology\\&quot; how do you defend against #Cyberattacks? @FireEye #cybersecurity http:\/\/t.co\/Eg5H9UmVlY&quot; ##  ## [[2]] ## [1] &quot;@MPBorman: \u0091#Cybersecurity on agenda for 80% corporate boards http:\/\/t.co\/eLfxkgi2FT  @CS\u0085 http:\/\/t.co\/h9tjop0ete http:\/\/t.co\/qiyfP94FlQ&quot; ##  ## [[3]] ## [1] &quot;The FDA takes steps to strengthen cybersecurity of medical devices | @scoopit via @60601Testing http:\/\/t.co\/9eC5LhGgBa&quot; ##  ## [[4]] ## [1] &quot;Senior Solutions Architect, Cybersecurity, NYC-Long Island region, Virtual offic... http:\/\/t.co\/68aOUMNgqy #job#cybersecurity&quot; ##  ## [[5]] ## [1] &quot;RT @Cyveillance: http:\/\/t.co\/Ym8WZXX55t #cybersecurity #infosec - The #DarkWeb As You Know It Is A Myth via @Wired http:\/\/t.co\/R67Nh6Ck70&quot; <\/code><\/pre>\n<h5>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0447\u0438\u0449\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430<\/h5>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0440\u044f\u0434 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043e\u0447\u0438\u0441\u0442\u0438\u0442 \u0442\u0435\u043a\u0441\u0442: \u0443\u0434\u0430\u043b\u0438\u0442 \u0437\u043d\u0430\u043a\u0438 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0441\u0441\u044b\u043b\u043a\u0438, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u0446\u0438\u0444\u0440\u044b. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>tolower()<\/code>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>tolower()<\/code> \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u043e\u0448\u0438\u0431\u043e\u043a, <code>tryTolower<\/code>, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0447\u0438\u0449\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430.  <\/p>\n<pre><code class=\"python\">tryTolower = function(x) {   y = NA   # tryCatch error   try_error = tryCatch(tolower(x), error = function(e) e)   # if not an error   if (!inherits(try_error, &quot;error&quot;))     y = tolower(x)   return(y) } <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f clean() \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0442\u0432\u0438\u0442\u044b \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u043b\u043e\u0432.  <\/p>\n<pre><code class=\"python\">clean=function(t){  t=gsub('[[:punct:]]','',t)  t=gsub('[[:cntrl:]]','',t)   t=gsub('\\\\d+','',t)  t=gsub('[[:digit:]]','',t)  t=gsub('@\\\\w+','',t)  t=gsub('http\\\\w+','',t)  t=gsub(&quot;^\\\\s+|\\\\s+$&quot;, &quot;&quot;, t)  t=sapply(t,function(x) tryTolower(x))  t=str_split(t,&quot; &quot;)  t=unlist(t)  return(t) } <\/code><\/pre>\n<h5>\u041e\u0447\u0438\u0449\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0442\u0432\u0438\u0442\u043e\u0432 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430<\/h5>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>clean()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c 5000 \u0442\u0432\u0438\u0442\u043e\u0432. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439-\u0441\u043f\u0438\u0441\u043a\u0435 <code>tweetclean<\/code>. \u041d\u0438\u0436\u0435\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u044f\u0442\u044c \u0442\u0432\u0438\u0442\u043e\u0432, \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.  <\/p>\n<pre><code class=\"python\">tweetclean=lapply(tweetT,function(x) clean(x)) head(tweetclean,5) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## [[1]] ##  [1] &quot;rt&quot;            &quot;pciaa&quot;         &quot;you&quot;           &quot;must&quot;          ##  [5] &quot;have&quot;          &quot;realtime&quot;      &quot;technology&quot;    &quot;how&quot;           ##  [9] &quot;do&quot;            &quot;you&quot;           &quot;defend&quot;        &quot;against&quot;       ## [13] &quot;cyberattacks&quot;  &quot;fireeye&quot;       &quot;cybersecurity&quot; ##  ## [[2]] ##  [1] &quot;mpborman&quot;       &quot;cybersecurity&quot; &quot;on&quot;             &quot;agenda&quot;         ##  [5] &quot;for&quot;            &quot;&quot;               &quot;corporate&quot;      &quot;boards&quot;         ##  [9] &quot; &quot;              &quot;cs&quot;            ##  ## [[3]] ##  [1] &quot;the&quot;           &quot;fda&quot;           &quot;takes&quot;         &quot;steps&quot;         ##  [5] &quot;to&quot;            &quot;strengthen&quot;    &quot;cybersecurity&quot; &quot;of&quot;            ##  [9] &quot;medical&quot;       &quot;devices&quot;       &quot;&quot;              &quot;scoopit&quot;       ## [13] &quot;via&quot;           &quot;testing&quot;       ##  ## [[4]] ##  [1] &quot;senior&quot;           &quot;solutions&quot;        &quot;architect&quot;        ##  [4] &quot;cybersecurity&quot;    &quot;nyclong&quot;          &quot;island&quot;           ##  [7] &quot;region&quot;           &quot;virtual&quot;          &quot;offic&quot;            ## [10] &quot;&quot;                 &quot;jobcybersecurity&quot; ##  ## [[5]] ##  [1] &quot;rt&quot;            &quot;cyveillance&quot;   &quot;&quot;              &quot;cybersecurity&quot; ##  [5] &quot;infosec&quot;       &quot;&quot;              &quot;the&quot;           &quot;darkweb&quot;       ##  [9] &quot;as&quot;            &quot;you&quot;           &quot;know&quot;          &quot;it&quot;            ## [13] &quot;is&quot;            &quot;a&quot;             &quot;myth&quot;          &quot;via&quot;           ## [17] &quot;wired&quot; <\/code><\/pre>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u0442\u0432\u0438\u0442\u043e\u0432<\/h4>\n<p>  \u041c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0432\u0438\u0442\u043e\u0432. \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u044b \u0442\u0432\u0438\u0442\u043e\u0432 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0441\u043b\u043e\u0432\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b. \u0412\u043e\u0442 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>returnpscore<\/code> \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439.  <\/p>\n<pre><code class=\"python\">returnpscore=function(tweet) {     pos.match=match(tweet,positive)     pos.match=!is.na(pos.match)     pos.score=sum(pos.match)     return(pos.score) } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0441\u043f\u0438\u0441\u043a\u0443 <code>tweetclean<\/code>.  <\/p>\n<pre><code class=\"python\">positive.score=lapply(tweetclean,function(x) returnpscore(x)) <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0437\u0430\u0434\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u0442\u0432\u0438\u0442\u0430\u0445.  <\/p>\n<pre><code class=\"python\">pcount=0 for (i in 1:length(positive.score)) {   pcount=pcount+positive.score[[i]] } pcount <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## [1] 1569 <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432\u044b\u0448\u0435, \u0432 \u0442\u0432\u0438\u0442\u0430\u0445 1569 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"python\">poswords=function(tweets){     pmatch=match(t,positive)     posw=positive[pmatch]     posw=posw[!is.na(posw)]     return(posw)   } <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 <code>tweetclean<\/code>, \u0438 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 data frame, <code>pdatamart<\/code>. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 10 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432.  <\/p>\n<pre><code class=\"python\">words=NULL pdatamart=data.frame(words)  for (t in tweetclean) {   pdatamart=c(poswords(t),pdatamart) } head(pdatamart,10) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## [[1]] ## [1] &quot;best&quot; ##  ## [[2]] ## [1] &quot;safe&quot; ##  ## [[3]] ## [1] &quot;capable&quot; ##  ## [[4]] ## [1] &quot;tough&quot; ##  ## [[5]] ## [1] &quot;fortune&quot; ##  ## [[6]] ## [1] &quot;excited&quot; ##  ## [[7]] ## [1] &quot;kudos&quot; ##  ## [[8]] ## [1] &quot;appropriate&quot; ##  ## [[9]] ## [1] &quot;humour&quot; ##  ## [[10]] ## [1] &quot;worth&quot; <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0446\u0438\u043a\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 data frame, <code>ndatamart<\/code>. \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0435\u0441\u044f\u0442\u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u0442\u0432\u0438\u0442\u0430\u0445.  <\/p>\n<pre><code class=\"python\">head(ndatamart,10) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">## [[1]] ## [1] &quot;attacks&quot; ##  ## [[2]] ## [1] &quot;breach&quot; ##  ## [[3]] ## [1] &quot;issues&quot; ##  ## [[4]] ## [1] &quot;attacks&quot; ##  ## [[5]] ## [1] &quot;poverty&quot; ##  ## [[6]] ## [1] &quot;attacks&quot; ##  ## [[7]] ## [1] &quot;dead&quot; ##  ## [[8]] ## [1] &quot;dead&quot; ##  ## [[9]] ## [1] &quot;dead&quot; ##  ## [[10]] ## [1] &quot;dead&quot; <\/code><\/pre>\n<h4>\u0413\u0440\u0430\u0444\u0438\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>unlist()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u0412\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>pwords<\/code> \u0438 <code>nwords<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a data frame-\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c.  <\/p>\n<pre><code class=\"python\">dpwords=data.frame(table(pwords)) dnwords=data.frame(table(nwords)) <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u043a\u0435\u0442 <code>dplyr<\/code>, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0442\u0438\u043f\u0430 character \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u043e\u0441\u0442\u0438 (<code>frequency &gt; 15<\/code>).  <\/p>\n<pre><code class=\"python\">dpwords=dpwords%&gt;%   mutate(pwords=as.character(pwords))%&gt;%   filter(Freq&gt;15) <\/code><\/pre>\n<p>  \u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0441 \u043f\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u043a\u0435\u0442\u0430 <code>ggplot2<\/code>. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432\u0441\u0435\u0433\u043e 1569. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.  <\/p>\n<pre><code class=\"python\">ggplot(dpwords,aes(pwords,Freq))+geom_bar(stat=&quot;identity&quot;,fill=&quot;lightblue&quot;)+theme_bw()+   geom_text(aes(pwords,Freq,label=Freq),size=4)+   labs(x=&quot;Major Positive Words&quot;, y=&quot;Frequency of Occurence&quot;,title=paste(&quot;Major Positive Words and Occurence in \\n '&quot;,findfd,&quot;' twitter feeds, n =&quot;,number))+   geom_text(aes(1,5,label=paste(&quot;Total Positive Words :&quot;,pcount)),size=4,hjust=0)+theme(axis.text.x=element_text(angle=45)) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3a0\/511\/549\/3a051154985f4a18ae66ef185618e199.png\"\/><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0443. \u0412 5000 \u0442\u0432\u0438\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u00abCyberSecurity\u00bb, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f 2063 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c3d\/f99\/ca8\/c3df99ca83ce48e3b647162844a0cc66.png\"\/><\/p>\n<h4>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0438\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u043a\u0430 \u0441\u043b\u043e\u0432<\/h4>\n<p>  \u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c <code>tweetclean<\/code> \u0432 \u0431\u043b\u043e\u043a \u0441\u043b\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>VectorSource<\/code>. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0435 \u043e\u0431\u0449\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 <code>tm<\/code>. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0438\u0445 \u0441\u043b\u043e\u0432, \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432, \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432:  <\/p>\n<pre><code class=\"python\">tweetscorpus=Corpus(VectorSource(tweetclean)) tweetscorpus=tm_map(tweetscorpus,removeWords,stopwords(&quot;english&quot;)) stopwords(&quot;english&quot;)[30:50] <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">##  [1] &quot;what&quot;   &quot;which&quot;  &quot;who&quot;    &quot;whom&quot;   &quot;this&quot;   &quot;that&quot;   &quot;these&quot;  ##  [8] &quot;those&quot;  &quot;am&quot;     &quot;is&quot;     &quot;are&quot;    &quot;was&quot;    &quot;were&quot;   &quot;be&quot;     ## [15] &quot;been&quot;   &quot;being&quot;  &quot;have&quot;   &quot;has&quot;    &quot;had&quot;    &quot;having&quot; &quot;do&quot; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u0442\u0432\u0438\u0442\u043e\u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0441\u043b\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u043a\u0435\u0442 <code>wordcloud<\/code>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u2014 300.  <\/p>\n<pre><code class=\"python\">wordcloud(tweetscorpus,scale=c(5,0.5),random.order = TRUE,rot.per = 0.20,use.r.layout = FALSE,colors = brewer.pal(6,&quot;Dark2&quot;),max.words = 300) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/79b\/cbf\/b53\/79bcbfb5393c4e2193c1966d65bcd231.png\"\/><\/p>\n<h4>\u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u043b\u043e\u0432<\/h4>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0431\u043b\u043e\u043a \u0441\u043b\u043e\u0432 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>DocumentTermMatrix<\/code>. \u041c\u0430\u0442\u0440\u0438\u0446\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0435\u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u0417\u0430\u0442\u0435\u043c \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u0437 \u0431\u043b\u043e\u043a\u0430 \u0440\u0435\u0434\u043a\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 (\u0441\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043d\u0438\u0437\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u043e\u0441\u0442\u0438). \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f (\u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 50 \u0438 \u0432\u044b\u0448\u0435).  <\/p>\n<pre><code class=\"python\">dtm=DocumentTermMatrix(tweetscorpus) # #removing sparse terms dtms=removeSparseTerms(dtm,.99) freq=sort(colSums(as.matrix(dtm)),decreasing=TRUE) #get some more frequent terms findFreqTerms(dtm,lowfreq=100) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"diff\">##  [1] &quot;amp&quot;           &quot;atf&quot;           &quot;better&quot;        &quot;breach&quot;        ##  [5] &quot;china&quot;         &quot;cyber&quot;         &quot;cybercrime&quot;    &quot;cybersecurity&quot; ##  [9] &quot;data&quot;          &quot;experts&quot;       &quot;federal&quot;       &quot;firm&quot;          ## [13] &quot;government&quot;    &quot;hackers&quot;       &quot;hack&quot;          &quot;healthcare&quot;    ## [17] &quot;help&quot;          &quot;heres&quot;         &quot;http\u0085&quot;         &quot;icit&quot;          ## [21] &quot;infosec&quot;       &quot;investigation&quot; &quot;iot&quot;           &quot;learn&quot;         ## [25] &quot;look&quot;          &quot;love&quot;          &quot;lunch&quot;         &quot;new&quot;           ## [29] &quot;news&quot;          &quot;next&quot;          &quot;official&quot;      &quot;opm&quot;           ## [33] &quot;passwords&quot;     &quot;possible&quot;      &quot;post&quot;          &quot;privacy&quot;       ## [37] &quot;reportedly&quot;    &quot;securing&quot;      &quot;security&quot;      &quot;senior&quot;        ## [41] &quot;share&quot;         &quot;site&quot;          &quot;startups&quot;      &quot;talk&quot;          ## [45] &quot;thehill&quot;       &quot;tips&quot;          &quot;took&quot;          &quot;top&quot;           ## [49] &quot;via&quot;           &quot;wanted&quot;        &quot;wed&quot;           &quot;whats&quot; <\/code><\/pre>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043a data frame, \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u043f\u043e <code>Minimum frequency &gt; 75<\/code> \u0438 \u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ggplot2<\/code>:  <\/p>\n<pre><code class=\"python\">wf=data.frame(word=names(freq),freq=freq) wfh=wf%&gt;%   filter(freq&gt;=75,!word==tolower(findfd)) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">ggplot(wfh,aes(word,freq))+geom_bar(stat=&quot;identity&quot;,fill='lightblue')+theme_bw()+   theme(axis.text.x=element_text(angle=45,hjust=1))+   geom_text(aes(word,freq,label=freq),size=4)+labs(x=&quot;High Frequency Words &quot;,y=&quot;Number of Occurences&quot;, title=paste(&quot;High Frequency Words and Occurence in \\n '&quot;,findfd,&quot;' twitter feeds, n =&quot;,number))+   geom_text(aes(1,max(freq)-100,label=paste(&quot;# Positive Words:&quot;,pcount,&quot;\\n&quot;,&quot;# Negative Words:&quot;,ncount,&quot;\\n&quot;,result(ncount,pcount))),size=5, hjust=0) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/21f\/d6b\/f55\/21fd6bf55ca04bc59bbdf11d548524c8.png\"\/><\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c CyberSecurity \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c 1,3: 1. \u042d\u0442\u043e\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u043d\u0434\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u043f\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u0442\u0435\u043c\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.   \t<\/p>\n<div class=\"clear\"><\/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=\"http:\/\/habrahabr.ru\/post\/261589\/\"> http:\/\/habrahabr.ru\/post\/261589\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (Twitter, Facebook, LinkedIn) \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u044b\u0441\u043b\u0435\u0439 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u0432\u043e\u0434\u0430\u043c. \u041c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0442\u0432\u0438\u0442\u043e\u0432 (\u043f\u043e\u0441\u0442\u043e\u0432) \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u2014 \u0442\u0430\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, Twitter \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0435\u043b, \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433. Twitter \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433. \u0422\u0430\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439. \u041c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c twitter-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0438\u0445 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <i>\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/i>. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u043b\u043e\u0432. \u042d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043c\u043d\u0435\u043d\u0438\u0438 \u0438 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0439. \u041c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0445 \u043c\u043d\u0435\u043d\u0438\u0435 (\u0442\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432) \u0432\u0437\u044f\u0442 \u0438\u0437 <a href=\"http:\/\/www.cs.uic.edu\/~liub\/FBS\/sentiment-analysis.html#lexicon\">\u0425\u044c\u044e \u0438 \u041b\u044c\u044e, KDD-2004<\/a>.<\/p>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 R \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c <code>twitteR, dplyr, stringr, ggplot2, tm, SnowballC, qdap<\/code> \u0438 <code>wordcloud<\/code>. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>install.packages()<\/code> \u0438 <code>library()<\/code>.  <\/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-260840","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260840","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=260840"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260840\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}