Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.1.9; auto-update working, allow user to switch stoplists

  • Loading branch information...
commit ba4aaad4581bb70f7cd8a4476232c49a312e7147 1 parent 425c602
@corajr corajr authored
View
5 README.md
@@ -14,7 +14,7 @@ In order to run Paper Machines, you will need the following (note that Python an
* Java ([download for Windows/Mac/Linux/etc.](http://java.com/en/download/index.jsp))
## Installation
-Paper Machines should work either in Zotero for Firefox or Zotero Standalone. To install, you must download the <a href="https://github.com/downloads/chrisjr/papermachines/papermachines-0.1.7.xpi">XPI file</a>. If you wish to use the extension in the Standalone version, right-click on the link and save the XPI file in your Downloads folder. Then, in Zotero Standalone, go to the Tools menu -> Add-Ons. Select the gear icon at the right, then "Install Add-On From File." Navigate to your Downloads folder (or wherever you have saved the XPI file) and open it.
+Paper Machines should work either in Zotero for Firefox or Zotero Standalone. To install, you must download the <a href="https://github.com/downloads/chrisjr/papermachines/papermachines-0.1.9.xpi">XPI file</a>. If you wish to use the extension in the Standalone version, right-click on the link and save the XPI file in your Downloads folder. Then, in Zotero Standalone, go to the Tools menu -> Add-Ons. Select the gear icon at the right, then "Install Add-On From File." Navigate to your Downloads folder (or wherever you have saved the XPI file) and open it.
## Usage
To begin, right-click (control-click for Mac) on the collection you wish to analyze and select "Extract Texts for Paper Machines." Once the extraction process is complete, this right-click menu will offer several different processes that may be run on a collection, each with an accompanying visualization. Once these processes have been run, selecting "Export Output of Paper Machines" will allow you to choose which visualizations to export.
@@ -42,6 +42,9 @@ The topic model can be supplemented with datasets from [JSTOR Data For Research]
### Classification
This allows you to train the computer to infer the common features of the documents under each subcollection; subsequently, a set of texts in a different folder can be sorted automatically based on this training. At the moment, the probability distribution for each text is given in plain text; the ability to automatically generate a new collection according to this sorting is forthcoming.
+### Select Stoplists
+A command at the bottom of the context menu allows you to switch between stoplists for different languages, choosing a list of common words to be excluded from analysis. Currently English and Portuguese are available, with English as the default.
+
## Acknowledgements
Thanks to Google Summer of Code for funding this work, and to [Matthew Battles](http://metalab.harvard.edu/people/) and [Jo Guldi](http://www.joguldi.com/) for overseeing it. My gratitude also to the creators of all the open-source projects and services upon which this work relies:
View
9 chrome/content/papermachines/overlay.xul
@@ -93,6 +93,15 @@
oncommand="Zotero.PaperMachines.exportOutput()"/>
<menuitem id="reset-output" label="&papermachines.collectionmenu.reset_output;"
oncommand="Zotero.PaperMachines.resetOutput()"/>
+
+ <menu id="select-stoplist" label="&papermachines.collectionmenu.select_stoplist;">
+ <menupopup id="select-stoplist-menu">
+ <menuitem id="stoplist_en" label="&papermachines.stoplists.en;"
+ oncommand="Zotero.PaperMachines.selectStoplist('en');"/>
+ <menuitem id="stoplist_pt" label="&papermachines.stoplists.pt;"
+ oncommand="Zotero.PaperMachines.selectStoplist('pt');"/>
+ </menupopup>
+ </menu>
</menupopup>
<menupopup id="zotero-itemmenu">
<menuseparator hidden="false"/>
View
6 chrome/content/papermachines/papermachines.js
@@ -164,6 +164,8 @@ Zotero.PaperMachines = {
this.log_dir = this._getOrCreateDir("logs", this.out_dir);
this.args_dir = this._getOrCreateDir("args");
+ this.selectStoplist("en");
+
this.getStringsFromBundle();
try {
@@ -1024,6 +1026,10 @@ Zotero.PaperMachines = {
return Zotero.PaperMachines._promptWithParams(params);
},
+ selectStoplist: function (lang) {
+ var stopfile = Zotero.PaperMachines._getOrCreateFile("stopwords_" + lang + ".txt", Zotero.PaperMachines.processors_dir);
+ stopfile.copyTo(Zotero.PaperMachines.processors_dir, "stopwords.txt");
+ },
textPrompt: function(prompt, default_text) {
if (!default_text) var default_text = "";
var params = {"dataIn": {"type": "text", "default": default_text, "prompt": Zotero.PaperMachines.prompts[prompt]}, "dataOut": null};
View
0  ...nt/papermachines/processors/stopwords.txt → ...papermachines/processors/stopwords_en.txt
File renamed without changes
View
6 chrome/locale/en-US/papermachines/papermachines.dtd
@@ -32,6 +32,12 @@
<!ENTITY papermachines.collectionmenu.export_output "Export Output of Paper Machines">
<!ENTITY papermachines.collectionmenu.reset_output "Reset Output of Paper Machines">
+
+<!ENTITY papermachines.collectionmenu.select_stoplist "Select Stoplist for Paper Machines">
+
+<!ENTITY papermachines.stoplists.en "English">
+<!ENTITY papermachines.stoplists.pt "Portuguese">
+
<!ENTITY papermachines.itemmenu.text_in_topic_view "Show Text in Topic View">
<!ENTITY papermachines.itemmenu.text_in_map_view "Locate Text in Map View">
View
11 install.rdf
@@ -5,11 +5,18 @@
<Description about="urn:mozilla:install-manifest">
<em:id>papermachines@chrisjr.org</em:id>
<em:name>Paper Machines</em:name>
- <em:version>0.1.8</em:version>
+ <em:version>0.1.9</em:version>
<em:description>A Zotero extension for analysis and visualization in the digital humanities.</em:description>
<em:creator>Chris Johnson-Roberson</em:creator>
+ <em:homepageURL>http://chrisjr.github.com/papermachines/</em:homepageURL>
<em:unpack>true</em:unpack>
- <em:updateURL>https://github.com/downloads/chrisjr/papermachines/plugins.rdf</em:updateURL>
+ <em:updateURL>http://cloud.github.com/downloads/chrisjr/papermachines/plugins.rdf</em:updateURL>
+ <em:updateKey>
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMzBTH2FmT/UOju1AmcinTiHIyRnnZuk
+ olnOvUutEtjuo9LsG0LU4PTpC6HfcOckfRk3yRLx68Kz7jfUtpLUj4NDcql2OrwPZKnGD9
+ 27vwCxrQAFEYuH48avJ+NURyu8JKzlAoSdhtyhev6VhKqBLhPUeNUBzWYVuhMOysXcUuyQ
+ IDAQAB
+ </em:updateKey>
<em:type>2</em:type> <!-- type=extension -->
<!-- Requires Zotero -->
Please sign in to comment.
Something went wrong with that request. Please try again.