Skip to content

dylnuge/once-and-future-vis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#The Once and Future Visualization Project by Dylan Nugent <dylnuge@gmail.com>
University of Illinois at Urbana-Champaign

Description

Two visualizations of chapters from "The Once and Future King," by T. H. White. This repository contains both the code for generating the visualization input given the text files for the document and the code for the visualization itself. For copyright reasons, the input text is not included here.

The first visualization, in the wordle folder, is a chapter-by-chapter breakdown of unique words used within The Once and Future King.

The second visualization, in the hierarchy folder, is a drill down view of the four major categories of open words (nouns, verbs, adjectives, and adverbs) used within The Once and Future King by their synonym categories.

Instructions

Parser

The parser is a Python 2.x program using the NLTK library for text processing. To set up an environment for it and run it on input files (assuming you are starting in the parser directory):

  1. Run virtualenv env to create a new virtual environment. If you have Python 3 as your default virtualenv target, modify this command to make a python2 virtual environment.
  2. Run source env\bin\activate to activate the environment.
  3. Run pip install -r requirements.txt to install NLTK.
  4. Run python parser.py with the list of chapters as your arguments, seperated by spaces. For instance, to run on four chapters of The Once and Future King named ofk1.txt through ofk4.txt run python parser.py ofk{1,2,3,4}.txt.

Visualizer

The visualizer is entirely static HTML and JavaScript code that expects a file called "vis_in.json" to be present in the data directory. To run it, simply open index.html in a browser that supports D3 (should be pretty much all of them).

Collaborators

Created by Dylan Nugent at the University of Illinois at Urbana-Champaign for CS 398VL (Visualizing Literature) in the Spring 2014 semester.

Licence/Legal

Copyright 2014 Dylan Nugent. All Rights Reserved.

I intend in the future to release this under an open source license.

About

Visualization of The Once and Future King Chapters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published