Intro to Stylo
Stylo home page
Things to install
- RStudio
- R, this is a maybe
- Mac users only: XQuartz
Prep your corpus
- Create a working folder for the project you’re tackling (e.g., bom-stylo)
- 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.
- 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
- Install Stylo by typing
install.packages("stylo"). You’ll only need to do this once. Note the need for quotation marks.
- Activate Stylo by typing
library(stylo). You’ll need to do this each time you start an RStudio session.
- Move to your working folder (not the corpus folder) with the command
setwd(filepath).
- Type
stylo() to start up the function with the GUI working.
- Click
OK when you’ve got all the options set.
GUI options to tweak
Features
- Change MFW (most frequent word) count. Keep Minimum and Maximum set to identical values.
- Change Features from words to chars if wanted
Statistics
- Cluster Analysis will produce a dendrogram
- PCA (corr.) will produce a principal component analysis, which is easier to read.
Output
- Click “png” to save a copy of the outputted image file
- CPA flavour
- Classic will be a simple graph with just the label of the text
- Loadings will provide the MFW superimposed along with the labels of the text