English 197 — Intro to DH (2022 F) — Practicums

Practicum Instructions for English 197 (Fall 2022)

Digital Humanities: Introduction to the Field

This is the main course website. There is also a course Canvas site for uploading assignments.

Practicum Assignment Instructions

Due various dates

30% of Final Grade

Course “practicums” are small-scale, hands-on exercises that ask students to experiment at a beginner’s level with the methods and tools of the digital humanities.

Reason for Assignment: The goal is not technical mastery but learning enough about the technologies to think about, and through, their concepts and also to discover which methods and tools might be used in a student’s future research. In many cases, experience gained in the practicums will contribute directly to the discussion of issues in class.

Outputs from Practicums: Outputs should be uploaded on Canvas as a post in the discussion board set up for each practicum. (Posts on the discussion board can include links or attachments–e.g., an attachment of a Word document containing explanatory text, tables, and screenshots.) Posts in these practicum discussion boards will be viewable by all members of the class.


Grading of Practicums: Practicums will be graded cumulatively instead of individually. At about the middle of the quarter, Prof. Liu will provide each student with an assessment of how they have been doing in their practicums so far (e.g., whether a student is doing A or B-level work). Then at the end of the quarter, Prof. Liu will give a cumulative grade for a student’s practicums. The grade will be based on the following criteria:

Grading Rubric for Practicums:
  • Effort
  • Creativity
  • Quality of materials representing outputs from a practicum (including comments or reflections on an exercise when that is requested)
  • Note: technical skill is not by itself a criterion for doing on the grade for the practicums. For example, it is possible to “fail” at getting a method or tool to “work” but still do well on a practicum based on effort, comments on what you learned even if  you couldn’t complete the exercise, etc.

Practicum 1 (by Class 3)

Google Books Ngram Viewer Exercise

Learn to use the Google Books Ngram Viewer, including at least a few of the “advanced features” explained on the “About Ngram Viewer” page. Then use the Ngram Viewer to explore some topic or issue of interest to you.

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

  • Note that you can make links to graphs that the Ngram Viewer creates. (Here is an example of such a link.)
  • You can also “embed” the graphs in your posts on the discussion board in Canvas  (as in the below example). To embed a graph, click on the three dots at the top right of the Ngram Viewer interface and click on “Share.” Then choose “Embed chart,” copy the code that appears, and paste into your post. (You need to be in source-code view while editing the post, which you toggle on with the  icon labled </> at the bottom of the editing window.)

Example of “embedding” a Google Books Ngram Viewer graph on a web page.

Text Encoding Exercise

(A) Simple HTML Exercise (with an added conceptually challenging problem)

Step 1 (hands-on exercise): Go to the W3C Schools HTML Tutorial page and look quickly at the explanations in the first 7 lessons linked in the left sidebar (from “HTML Introduction” to “HTML Paragraphs”). Also selectively look at the explanations for other lessons of interest to you. Be sure to look as well at the explanation of “HTML CSS.” (Students already familiar with HTML and CSS can skip these explanations.)

Then on the home page of the W3C Schools HTML Tutorial page, click on the “Try it Yourself” button to open a two column interactive page where you can write HTML on the left, hit the “Run” button, and see the results rendered on the right. On this page, write HTML to create a simple web page with any content, images, and links you wish (subject, of course, to good taste and copyright laws). The page should include at least the following features:

  • Text formatted in basic ways (as headers, bold, italics, etc.)
  • Text in paragraph structures
  • Text in lists
  • Links
  • A table
  • An image

Also experiment with simple CSS (Cascading Style Sheets) to adjust the format/style of various elements on your test page. Students already familiar with HTML and CSS can conduct more advanced exercises if they wish.

Output A ⇨ When you are done, copy the HTML code you created to a document and upload it in a post to the Canvas discussion board for this practicum.

Step 2 (conceptual exercise): This is a purely conceptual exercise; you don’t actually have to do it (unless you are interested). Take a look at E. E. Cummings’ well-known poem “r-p-o-p-h-e-s-s-a-g-r” (1935). (If you are interested, you can read an analysis of the poem, also known as “Grasshopper,” here.) Think about what might be the best approach to encoding this in HTML; and be prepared to share your ideas in class discussion. (Note that multiple spaces entered in HTML code renders normally as a single space.)

(B) Imaginary TEI/XML Exercise

In this exercise, you will automatically generate a basic TEI XML encoding of Lincoln’s Gettysburg Address (Bliss copy, 1864) and then make up additional tags to encode something you think is important or of interest to you in the text.

  1. First download and save this text file to your computer: lincoln-gettysburg-address-bliss-copy-1864.txt. (Save as a file with a “.txt” extension.)
  2. Go to the Text Encoding Initiative’s OxGarage Conversion site, and follow this process:
    1. For “Convert from: ?”, click on “Documents”. Among the options for document formats, choose “Plain Text (.txt).”
    2. Then after a wait, you will see the prompt “Convert to: ?” appear to the right. Choose among the options “TEI P5 XML Document”.
    3. When the next set of prompts appear at the top of the screen, click on “Choose File” and select the Lincoln text file where you stored it on your computer.
    4. Then click on “Convert”, which will generate a TEI/XML encoded version of the Lincoln text and download it to you computer with the file extension .xml.
    5. Open this .xml file in a text editor (such as Notepad, Notepad++, or TextEdit) so that you are prepared to copy and paste from it.
  3. Next go to the XML Viewer page on the Code Beautify site.
    1. Copy and paste the content of the Lincoln .xml file you previously created into the “XML Input” column on the left.
    2. Then click the button in the center of the page for “Beautify Format” to generate a nicely formatted version of the XML in the column at the right.
    3. Then click on “Download” in the center of the page to download the beautified version of the Lincoln .xml file. (Or just copy-and-paste from the column on the right into a text editor like Notepad,  Notepad++, or TextEdit, and save the file as a .xml file.)
  4. Now think about what you would like to encode in the beautified Lincoln .xml file that seems important or interesting, and how to do it. Since this is an imaginary exercise, you do not need to study the TEI guidelines for actual tags designating elements, attributes, etc. (If you are interested, though, you can get a sense of what is possible by browsing the TEI by Example Tutorials, such as the one for encoding prose.) Just make up your own tags. For example, you could make up a tag to use in the first sentence of Lincoln’s speech such as this one (a tag for the element “metaphor” that has attributes for “type” and whatever else you wish): “Four score and seven years ago <metaphor type=”genealogical” subtype=”patriarchal” motive=”call_for_authority”>our fathers</metaphor>….” Encode part or all of the text with one or two kinds of tags of this sort.

Output B ⇨ When you are done save the code of your revised .xml file in a document that you upload to the Canvas discussion board for this practicum (you may included it in the same document you upload for the first part of this exercise). Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

Text Analysis Exercise

What you will need for this exercise:

  • Antconc program (download)
  • A stopwords list (download the following stopwords list and save it as a plain-text “.txt” file on your computer: buckley-salton.txt)
  • A long document or set of documents (up to several hundred documents if you wish) that you have access to as plain text files (stored as “.txt” files). [See suggestions for sources of texts below]

Instructions for this exercise:

  1. Download onto your computer the Antconc text-analysis program (available for Mac, Windows, Linux). Antconc comes as a simple executable file that does not need to be “installed.” You just run the file.
    • Note for Mac Users: When you try to open AntConc, there will be a security message that says the app was prevented from opening. In order to get around this, you need to click the Apple icon, go to System Preferences, then Security & Privacy, and (if you haven’t already) change your preferences to Allow apps downloaded from “App Store and identified developers.” Even if these are your settings, the system will prevent AntConc from opening (it’s not an identified developer), but there will be a caption next to the radio buttons that says something along the lines of “AntConc was prevented from opening” and a button labeled “Open Anyway.” Click Open Anyway, and you shouldn’t have any issues running the application after that. 

    Note: If you have trouble getting AntConc to work (e.g., on a Mac) and cannot resolve the issues, then you may want to try a different well-known program that runs wholly through a browser online: Voyant Tools. On the Voyant Tools site, you can upload your own files for analysis. Or you can experiment with two corpora of demo text files (by Shakespeare or Austen). (Click “Open” on the home screen to access the demo files).

    Voyant Tools include a whole suite of tools presented in a “dashboard” style, each of whose panes can be set for a different tool. Tools relevant to this practicum (analogous to those in AntConc) include “Corpus Terms,” “Corpus Collocates,” “Phrases,” etc. See the Voyant Tools Help page for guides to each tool.

    Configuration bar in each of Voyant Tools's panes. Click on the icon that the cursor is pointing to here to open a menu of tools.
    Configuration bar in each of Voyant Tools’s panes. Click on the icon that the cursor is pointing to here to open a menu of tools.

  2. Find or create a plain-text (.txt) version of a long literary work or collection of works. Possible sources:
    • Alan keeps a set of demo text corpora on his DH Toychest site here.

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots of Antconc, or text files created by using Antconc’s “Save Output” function that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.


  • Tutorials for Antconc:
  • Basic Instructions for using Antconc: (click on thumbnails for larger screenshot images)
    •  (Step 1) Open either a file or a whole folder of files stored on your computer (must be .txt files).
    • (Step 2) Go to “Tool Preferences” to load a stopwords list (and, if you wish, also a comparison “reference” text or texts for use with Antconc’s “keywords” function). See below.
      Antconc - loading files and accessing the tool preferences
  • Instructions for using a “stopwords” list in Antconc (to filter out common words like “the,” “of,” etc.):
    • Download the following stopwords list and save it as a plain-text “txt” file on your computer: buckley-salton.txt
    • In AntConc, click on “Tool Preferences” among the tabs at the top. Then follow these steps:
      • (Step 1) Select “Word list” preferences
      • (Step 2) Choose “Use a stoplist below”
      • (Step 3) Open a stoplist file (“Add words from a file” > “”Open)
        • Choose the buckley-salton.txt file on your computer
      • (Step 4) Then press “Apply” at the bottom.
        Antconc - loading a stoplist (stopwords list)
  • Instructions for loading a “reference” comparison file(s) for use with Antconc’s “Keywords” function (to see what words are most unique in a text, or have most “keyness,” compared with the reference files):
    • Have available a reference comparison file, or multiple files on your computer (must be plain-text “txt” files)
    • In AntConc, click on “Tool Preferences” among the tabs at the top. Then follow these steps:
      • (Step 1) Select “Keyword list” preferences
      • (Step 2) Click on “Add files” to choose the reference comparison file(s)
      • (Step 3) Click on “Load” to actually load the reference comparison file(s)
      • (Step 4) Click on “Apply”
        Antconc - Loading a "reference" comparison file(s) for use with the Keywords function
  • Now you can start exploring the document file(s) you chose for study using Antconc. The best way to start is to count all the words in the document(s):
    • (Step 1) Choose the “Word List” tab at the top
    • (Step 2) Click on “Start” to generate a list of all words found in your document(s), ranked by frequency of occurrence.
      Antconc - generating a word frequency list

Topic Modeling Exercise

  1. Read through (and, if you wish, try) the lesson plan in Shawn Graham, Ian Milligan, Scott Weingart, “Topic Modeling By Hand” (from The Historian’s Macroscope).
  2. Experiment with the Topic Modeling Tool, which provides a simplified, GUI front-end for the underlying MALLET topic modeling tool. (See the Topic Modeling Tool’s page linked above for download and operation instructions. Under “Optional Settings” in the program you can load a stopword list. For example, download the following stopwords list and save it as a plain-text “.txt” file on your computer: buckley-salton.txt. Or you can find stopword lists in many languages here and here.)
    [Optional, more ambitious exercise: download, install, and experiment with the actual MALLET topic-modeling tool, which runs from the command line. (See The Programming Historian Tutorial “Building a Topic Model with MALLET” for instructions on installing and running MALLET).]

    An ideal experiment is to topic model a relatively small collection of texts (e.g., 10 to 100 documents you have extracted as plain text and put in a folder) or a “chunked” plain-text version of a long text (e.g., a novel with separate files for each chapter).  If you wish, you can use any of the ready-to-go text collections in the “Demo Corpora” section of Alan’s DH Toychest.

Note: If you have trouble getting the Topic Modeling Tool to work, then you may want to try the similar “Topics” tool implemented online in Voyant Tools. On the Voyant Tools site, you can upload your own files for analysis. Or you can experiment with two corpora of demo text files (by Shakespeare or Austen). (Click “Open” on the home screen to access the demo files).

Voyant Tools include a whole suite of tools presented in a “dashboard” style, each of whose panes can be set for a different tool. The tool relevant to this practicum is “Topics.”  See the Voyant Tools Help page for guide to the tool.

Configuration bar in each of Voyant Tools's panes. Click on the icon that the cursor is pointing to here to open a menu of tools.
Configuration bar in each of Voyant Tools’s panes. Click on the icon that the cursor is pointing to here to open a menu of tools.

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots, spreadsheets, or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

Word Embedding Exercise

  1. Try the Tensorflow Embedding Projector (by Google AI)
    • Go to Tensorflow Embedding Projector.
    • Try various experiments.  (See this Google AI blog post for some ideas of things you can do.) For example, enter a word to explore (in the search field at the top right) and click on one of the related words that appears in the list labeled “Nearest points in the original space.” Then click on “Isolate 101 points” and observe the nearness/farness of words from other words.

      Interface for Tensorflow Embedding Projector
      Interface for Tensorflow Embedding Projector (Click on thumbnail for larger image to read descriptions of useful controls.)
  2. Try the Word Embedding Demo (by S. Bandyopadhyay et al.)
  3. Optional: For fun, try the Semantris game from Google AI (in its “Arcade” or “Blocks” variants)!

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

GPT-2 and Craiyon Exercise

  1. Try InferKit (by Adam King) or Write with Transformer GPT-2 (by Hugging Face). Use one or both of these demos of GPT-2 to generate the beginning of an essay, story, or some other text.
    • Note: You can also try sudowrite (by Human++). This is a pay service but allows you to sign up for a temporary free account.
  2. Try Craiyon (by Craiyon LLC) (Craiyon was formerly called “DALL-E mini”) Use the Craiyon tool to generate one or more images from a text prompt. Try interesting or challenging experiments, such as not just “flying cats” as a prompt, for example, but longer prompts, or prompts combining objective and subjective terms such as “Sad cats wearing gowns, looking up with hope at the far moon and wishing that they could be flying dragons dropping hope blossoms.” See what it is possible, not possible, to do with the tool.
    • Note: On the actual DALL-E neural network GPT-3 text-image model from OpenAI, see this blog post.
    Image generated using the Craiyon.com tool from the text prompt: "Sad cats wearing gowns, looking up with hope at the far moon and wishing that they could be flying dragons dropping hope blossoms." Image generated using the Craiyon.com tool from the text prompt: “Sad cats wearing gowns, looking up with hope at the far moon and wishing that they could be flying dragons dropping hope blossoms.”

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

Social Network Analysis Exercise (Part A)

This is an optional practicum for those who have a Twitter account. Use one or both of the following online services to explore networks of words, hashtags, or users on Twitter. (Create a free account on these services; and then allow the association of the service with your Twitter account, which will enable the services to use the Twitter API for their searches.)

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

Social Network Analysis Exercise (Part B)

  1. Manually create a small-scale social network analysis of a literary work (or section of a work) by deciding what nodes and edges you want to study. Read through the work and record the nodes and edges. (For example:  nodes = characters in a play; edges = characters who speak to each other.)
  2. Enter the nodes and edges in a spreadsheet using Excel or Google Sheets following the instructions here.
    • (Note that for the yEd graphing program mentioned below, you need to create the Nodes and Edges tables on the same sheet in the spreadsheet, not separate sheets However, if you optionally choose to use the Gephi graphing program instead (mentioned further below), the Nodes and Edges tables need to be created in separate sheets that you can import in .csv format into Gephi separately.
  3. Then use the yEd graphiing program (download here) to open and visualize the spreadsheet.

Optionally, you can use the Gephi social network analysis graphing program instead. Install Gephi on your computer. Then follow the below instructions first to take a tutorial and then to analyze your own Nodes and Edges:

Note: Gephi requires that Java be installed on your computer (see Gephi Requirements — “The current stable version of Gephi will only run with Java 7 or 8. On Mac OS X, Java is bundled with the application so it doesn’t have to be installed separately. On Windows and Linux, the system must be equipped with Java.” [Java download]).Debugging the “Cannot locate java installation in specified jkdhom” Gephi error on Windows machines: If Gephi reports “Cannot locate java installation in specified jkdhom”, then do the following:

  1. Go into your program folder and find the folder location of the latest version of Java on your computer. For example, C:\Program Files (x86)\Java\jre1.8.0_311
  2. Then open the following Gephi configuration file in a text editor: “C:\Program Files\Gephi-0.9.2\etc\gephi.conf” and change the following line so that it goes to your current version of Java: “jdkhome=”C:\Program Files (x86)\Java\jre1.8.0_311″

Alternative if you cannot get Gephi to run: As an alternative to using Gephi, use John Ladd and Zoe LeBlanc’s Network Navigator — an online-only tool for visualizing networks from data (in the form of “edge” files representing node to node connections). You may in any case be interested in putting your data into Network Navigator in addition to visualizing it in Gephi (or as a preliminary to experimenting with Gephi).

  1. Work through the following tutorial: Adapted version of Par Martin Grandjean’s Gephi Tutorial of 2013 (adapted by A. Liu for Gephi 0.9.1).

Cheatsheets & other tutorials for Gephi:

  1. Try to understand the logic/format of the two .csv files used in Grandjean’s Gephi tutorial (one that identifies the “nodes” and the other the “edges,” or relations between nodes). Then choose a very limited work or works that would be of interest to humanities scholars (e.g., a chapter in a novel, a scene in a play or film, an hour of a Twitter timeline from a conference) and create your own nodes and edges .csv files (which can be created in a plain-text editor or exported from a spreadsheet or even a word processor).  Use your .csv files in Gephi to create a visualization. (If you wish, you can create just a hypothetical set of nodes and edges “as if” you were analyzing something even though you don’t have time to do that for real at present.) (For other datasets of nodes and edges .csv files designed for use with Gephi, see Melanie Walsh’s “Sample Social Network Datasets For Teaching With Gephi (and Other Tools Like It).”)
  2. You may also be interested in downloading, unzipping, and opening or importing in Gephi some of the other Gephi datasets available from Wiki.Gephi.org in a variety of formats (.gexf and .gml).

Output ⇨ When you are done with the exercise, leave souvenirs of your experimentation in the form of screenshots or other material that you post to the Canvas discussion board for this practicum. Include in your post (or the document you attach to the post) a short comment (no more than 300 words total) that explains what you were trying to do, points out anything interesting that you observe, or comments on the method or tool used in the practicum.

This is the main course website. There is also a course Canvas site for uploading assignments.
css.php