{"id":681,"date":"2018-11-10T20:12:33","date_gmt":"2018-11-10T20:12:33","guid":{"rendered":"https:\/\/www.ryanboyd.io\/software\/meh\/?page_id=681"},"modified":"2021-01-13T14:00:29","modified_gmt":"2021-01-13T14:00:29","slug":"scripts","status":"publish","type":"page","link":"https:\/\/www.ryanboyd.io\/software\/meh\/scripts\/","title":{"rendered":"Analysis Scripts"},"content":{"rendered":"<p>On this page, I have links to a handful of scripts that I have written that might make your life easier. Many of these scripts are linked elsewhere on this website, but I wanted to make them all easier to find. All scripts on this page are completely free for you to use however you want. Below are links \/ brief descriptions of each script.<\/p>\n<hr \/>\n<p>If you are doing the Meaning Extraction Method, you can use the &#8220;binary&#8221;, &#8220;verbose&#8221;, or &#8220;raw count&#8221; outputs for your <strong>Principal Component Analysis<\/strong>. I have written an R script for running the PCA, which you are free to use &#8212; the script is located <a href=\"https:\/\/www.ryanboyd.io\/software\/meh\/Supplemental\/PCA-Template-for-MEM.R\">here<\/a>.<\/p>\n<p>Once you have completed your PCA, you may find that you would like to format your results\/loadings in a somewhat more readable format \u2014 one that shows you the words corresponding to each component rather than the loadings themselves. This view of a PCA result would be analogous to how a lot of classic Latent Dirichlet Allocation output tables would be formatted. If this approach is more up your alley, you might want to check out the &#8220;PCA Results Churner&#8221; scripts, kindly authored and shared here by John Henry Cruz. These scripts are available for download in a <a href=\"https:\/\/www.ryanboyd.io\/software\/meh\/Supplemental\/pca_results_churner.py\">vanilla python format<\/a>, as well as in <a href=\"https:\/\/www.ryanboyd.io\/software\/meh\/Supplemental\/pca_results_churner.ipynb\">Jupyter Notebook format<\/a>.<\/p>\n<hr \/>\n<p>The &#8220;raw count&#8221; document term matrix is something that you can use to run\u00a0<strong>Latent Dirichlet Allocation<\/strong>, in addition to other types of analyses.\u00a0If you are new to LDA, or you simply need an R script that makes LDA easy to use with MEH\u2019s raw count output, I have written one that you may freely use. It can be downloaded\u00a0<a href=\"https:\/\/www.ryanboyd.io\/software\/meh\/Supplemental\/LDA%20with%20MEH%20DTM.R\">here<\/a>.<\/p>\n<hr \/>\n<p>If you would like to get texts from your <strong>spreadsheets into separate .txt<\/strong> files prior to analysis with MEH, I have made a few different scripts available at\u00a0<a href=\"https:\/\/github.com\/ryanboyd\/CSVtoTXTscripts\">https:\/\/github.com\/ryanboyd\/CSVtoTXTscripts<\/a>. With some modifications, you can do things like aggregate your texts into specific files, etc. &#8212; essentially, aggregating texts as you desire prior to analysis with MEH.<\/p>\n<hr \/>\n<p>If you want to <strong>compare word frequencies \/ likelihoods<\/strong> from 2 different corpora, I have written a script that calculates all of the same same indices that are found on\u00a0<a href=\"http:\/\/ucrel.lancs.ac.uk\/llwizard.html\" target=\"_blank\" rel=\"noopener\">Paul Rayson\u2019s extremely helpful page<\/a>. Essentially, you can get 2 separate frequency lists from MEH (1 for each corpus), then apply\u00a0<a href=\"https:\/\/www.ryanboyd.io\/software\/meh\/Supplemental\/Corpus%20Comparison%20Script%20for%20MEH.R\">this script<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On this page, I have links to a handful of scripts that I have written that might make your life easier. Many of these scripts are linked elsewhere on this website, but I wanted to make them all easier to find. All scripts on this page are completely free for you to use however you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":97,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-681","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/pages\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/comments?post=681"}],"version-history":[{"count":7,"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/pages\/681\/revisions"}],"predecessor-version":[{"id":782,"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/pages\/681\/revisions\/782"}],"wp:attachment":[{"href":"https:\/\/www.ryanboyd.io\/software\/meh\/wp-json\/wp\/v2\/media?parent=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}