{"id":686,"date":"2016-08-03T07:40:40","date_gmt":"2016-08-03T06:40:40","guid":{"rendered":"http:\/\/blog.tiran.info\/?p=686"},"modified":"2017-12-22T14:43:57","modified_gmt":"2017-12-22T13:43:57","slug":"visualisation-en-nuage-de-mots-avec-r","status":"publish","type":"post","link":"https:\/\/blog.tiran.stream\/?p=686","title":{"rendered":"Visualisation en nuage de mots avec R"},"content":{"rendered":"<p style=\"text-align: justify;\">A l&rsquo;aide de R, on peut r\u00e9aliser tr\u00e8s simplement une repr\u00e9sentation similaire \u00e0 celle du <a href=\"http:\/\/blog.tiran.info\/visualisation-en-nuage-de-mots-avec-oracle\" target=\"_blank\">billet pr\u00e9c\u00e9dent<\/a>. Pour cela, la librairie wordcloud doit au pr\u00e9alable \u00eatre install\u00e9e (install.packages(\u00ab\u00a0wordcloud\u00a0\u00bb)).<\/p>\n<p style=\"text-align: justify;\">J&rsquo;utilise ici le m\u00eame environnement (m\u00eame dataframes et fonctions) que dans l&rsquo;article \u00ab\u00a0<a href=\"http:\/\/blog.tiran.info\/classification-bayesienne-naive-avec-r\" target=\"_blank\">Classification Bay\u00e9sienne Na\u00efve avec R<\/a>\u00ab\u00a0. Pour servir de support au nuage de mots-cl\u00e9s, un corpus sp\u00e9cifique aux extraits de livres de la cat\u00e9gorie Polar est cr\u00e9\u00e9:<\/p>\n<pre class=\"brush: js; ruler: true;\">&gt; library(wordcloud)\n&gt; PolarCorpus &lt;- CreeCorpus(train_set$EXTRAIT[which(train_set$CATEGORIE==&quot;polar&quot;)])\n&gt; wcloud_palette &lt;- brewer.pal(9,&quot;Oranges&quot;)\n&gt; wordcloud(PolarCorpus, min.freq=100, max.words=40, random.order=T, random.color=T, colors=wcloud_palette)\n&gt; \n<\/pre>\n<p><a href=\"https:\/\/blog.tiran.stream\/wp-content\/uploads\/2016\/08\/WCloudPolarR.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-688 size-full\" src=\"https:\/\/blog.tiran.stream\/wp-content\/uploads\/2016\/08\/WCloudPolarR.png\" alt=\"WCloudPolarR\" width=\"660\" height=\"553\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A l&rsquo;aide de R, on peut r\u00e9aliser tr\u00e8s simplement une repr\u00e9sentation similaire \u00e0 celle du billet pr\u00e9c\u00e9dent. Pour cela, la<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[12,19,17],"tags":[],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-r","category-donnees-non-structurees","category-visualisation"],"_links":{"self":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=686"}],"version-history":[{"count":1,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions"}],"predecessor-version":[{"id":1216,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions\/1216"}],"wp:attachment":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}