Intro to Stylo

Stylo home page

Things to install

  1. RStudio
  2. R, this is a maybe
  3. Mac users only: XQuartz

Prep your corpus

  1. Create a working folder for the project you’re tackling (e.g., bom-stylo)
  2. Within that working folder, create a folder called “corpus” and place your texts in there. It will work best if the files are plain text.
  3. Make sure that each text is named with the feature that you’re testing for, followed by an underscore and then whatever you want. For example, authorname_title_.txt or gender_title_.txt.

In RStudio

  1. Install Stylo by typing install.packages("stylo"). You’ll only need to do this once. Note the need for quotation marks.
  2. Activate Stylo by typing library(stylo). You’ll need to do this each time you start an RStudio session.
  3. Move to your working folder (not the corpus folder) with the command setwd(filepath).
  4. Type stylo() to start up the function with the GUI working.
  5. Click OK when you’ve got all the options set.

GUI options to tweak

Features

  1. Change MFW (most frequent word) count. Keep Minimum and Maximum set to identical values.
  2. Change Features from words to chars if wanted

Statistics

  1. Cluster Analysis will produce a dendrogram
  2. PCA (corr.) will produce a principal component analysis, which is easier to read.

Output

  1. Click “png” to save a copy of the outputted image file
  2. CPA flavour