Use the IPython interactive interface to fetch volume content, and then run vector space model and topic modeling on volumes' OCR content. It uses the inpho/vsm python package, a textual semantics package developed by Dr. Colin Allen and his team locally at IU.

VM Mode

This use case can be run in only secure mode in the VM. To export experiment results out of the VM, you need to release the result files in secure mode, and then receive results via email.

Example Use

First, switch the VM mode to secure mode. 

Second, edit the username and password with your portal username and password. The file is in ~/demo/vsm/ See the screenshot below. This is needed for HTRC Data API client. 

In the VM, start a Terminal, and change directory the vsm experiment folder

cd ~/demo/vsm

List the files of this folder


Start an IPython notebook server 


You will see something like this in the popped-up browser. Click on the HTRC_vsm_corpus.ipynb 

In the HTRC_vsm_corpus.ipynb notebook, run all the scripts by clicking on "Cell" -> "Run All" on menu of the top of the page.

You will find the scripts run into errors if the VM is in maintenance mode. 

The demo code in HTRC_vsm_corpus.ipynb takes one HTRC volume, and 

Then let's open another IPython notebook, HTRC_vsm_model.ipynb (list of IPython notebooks can be found at in the VM)

Run all the demo codes there by clicking on "Cell" -> "Run All"

This demo code: