{"id":6217,"date":"2015-10-09T15:48:44","date_gmt":"2015-10-09T19:48:44","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=6217"},"modified":"2015-10-12T11:28:01","modified_gmt":"2015-10-12T15:28:01","slug":"word-data-visualization","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2015\/10\/09\/word-data-visualization\/","title":{"rendered":"Word Data Visualization"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51793-word-data-visualisation\">Word Data Visualization<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/4878432\">Jenny<\/a>.\r\n      <\/p>\r\n   <\/introduction>\r\n\r\n   <p>Have you ever wanted to visualize what words make up a story or other written document?  One way to do this would be to use\r\n      a horizontal bar chart, which is quantitative but this doesn't scale with many words or let you interpret clusters of\r\n      similar words like you would to see in natural language processing.  The common way would be to use a word cloud which is\r\n      what Jenny's App allows you to do.\r\n   <\/p>\r\n   <p>Let's generate a word cloud for the text on the front page of MATLAB Answers<\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainwordcloudapp\/answerscloud.png\"> <\/p>\r\n   <p>I'm surprised to not see \"Walter\" as the largest value!<\/p>\r\n   <p>Jenny's app allows you to take plain text, a file, or a collection of files and then build the cloud.  It also removes common\r\n      words like \"a\" and \"the\". There are also a bunch of options you can use for adjusting the cloud appearance.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainwordcloudapp\/wordcloudeditor.png\"> <\/p>\r\n   <p>Although I like what the App does, and it seems to be very well written with lots of features, there are two things I'd like\r\n      to see. It would be good to have a command line interface in case you already have a list of words and their occurences to pass\r\n      into the app.  This could save steps and allows you to use multiple words as phrases.  Additional documentation on how to use it would be nice too.\r\n   <\/p>\r\n   <h3>Comments<a name=\"3\"><\/a><\/h3>\r\n   <p>Has anyone ever wanted to use MATLAB for word clouds or do you see a use for word cloud visualization?<\/p>\r\n   <p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=6217#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51793-word-data-visualisation#comments\">comment<\/a> for Jenny.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_71aae2c042aa48c5a9863ce506854573() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='71aae2c042aa48c5a9863ce506854573 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 71aae2c042aa48c5a9863ce506854573';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Sean de Wolski';\r\n        copyright = 'Copyright 2015 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_71aae2c042aa48c5a9863ce506854573()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2015b<br><\/p>\r\n<\/div>\r\n<!--\r\n71aae2c042aa48c5a9863ce506854573 ##### SOURCE BEGIN #####\r\n%% Word Data Visualization\r\n%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51793-word-data-visualisation Word Data Visualization> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/4878432 Jenny>.\r\n% \r\n\r\n%%\r\n% Have you ever wanted to visualize what words make up a story or other\r\n% written document?  One way to do this would be to use a horizontal bar\r\n% chart, which is quantitative but this doesn't scale with many words or\r\n% let you know interpret clusters of similar words like you would to see in\r\n% natural language processing.  The common way would be to use a word cloud\r\n% which is what Jenny's App allows you to do.\r\n%\r\n% Let's generate a word cloud for the text on the front page of MATLAB\r\n% Answers\r\n%\r\n% <<answerscloud.png>> \r\n%\r\n% I'm surprised to not see \"Walter\" as the largest value!\r\n%\r\n% Jenny's app allows you to take plain text, a file, or a collection of\r\n% files and then build the cloud.  It also removes common words like \"a\"\r\n% and \"the\". There are also a bunch of options you can use for adjusting\r\n% the cloud appearance.\r\n%\r\n% <<wordcloudeditor.png>>\r\n%\r\n\r\n%% \r\n% Although I like what the App does, and it seems to be very well written\r\n% with lots of features, there are two things I'd like to see. It would be\r\n% to have a command line interface in case you already have a list of words\r\n% and their occurences to pass into the app.  Additional documentation on\r\n% how to use the would be nice too.\r\n\r\n\r\n%% Comments\r\n% Has anyone ever wanted to use MATLAB for word clouds or do you see a use\r\n% for word cloud visualization?\r\n%\r\n%\r\n% Give it a try and let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=6217#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51793-word-data-visualisation#comments\r\n% comment> for Jenny.\r\n%\r\n \r\n\r\n##### SOURCE END ##### 71aae2c042aa48c5a9863ce506854573\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainwordcloudapp\/answerscloud.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   \r\n      Sean's pick this week is Word Data Visualization by Jenny.\r\n      \r\n   \r\n\r\n   Have you ever wanted to visualize what words make up a story or other written document?  One way... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2015\/10\/09\/word-data-visualization\/\">read more >><\/a><\/p>","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6217"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=6217"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6217\/revisions"}],"predecessor-version":[{"id":6222,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/6217\/revisions\/6222"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=6217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=6217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=6217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}