This repository contains the full project for my MA thesis at the University of Chicago's Computational Social Science program. The thesis examines how gender differences are psychologically constructed in character dialogue from role-playing video games, using computational methods such as psycholinguistic analysis, transformer-based emotion classification, and dimensionality reduction.
├── figures
│ ├── emotion_distribution.pdf # figure on the distribution of emotions
│ ├── emotion_frequency.pdf # figure on the frequency of emotions
│ ├── female_percentage.pdf # figure on the percetage of female words
│ └── pca.pdf # figure on the principal component analysis
└── scripts
├── data_analysis
│ ├── emotion_analysis.R # script for analyzing emotion variables
│ ├── exploratory_data_analysis.R # script for exploratory data analysis
│ ├── liwc_analysis.R # script for analyzing liwc variables
│ └── pca_analysis.R # script for principal component analysis
└── data_cleaning
├── death_stranding.py # script for cleaning dialogue data from Death Stranding
├── disco_elysium.py # script for cleaning dialogue data from Disco Elysium
├── elder_scrolls_morrowind.py # script for cleaning dialogue data from Elder Scrolls Morrowind
├── elder_scrolls_oblivion.py # script for cleaning dialogue data from Elder Scrolls Oblivion
├── elder_scrolls_skyrim.py # script for cleaning dialogue data from Elder Scrolls Skyrim
├── emotion_classification.py # script for classifying emotions
├── final_fantasy_vii_remake.py # script for cleaning dialogue data from Final Fantasy VII Remake
├── final_fantasy_x.py # script for cleaning dialogue data from Final Fantasy X
├── final_fantasy_xii.py # script for cleaning dialogue data from Final Fantasy XII
├── final_fantasy_xiii_2.py # script for cleaning dialogue data from Final Fantasy XIII-2
├── final_fantasy_xiii.py # script for cleaning dialogue data from Final Fantasy XIII
├── final_fantasy_xiv.py # script for cleaning dialogue data from Final Fantasy XIV
├── final_fantasy_xv.py # script for cleaning dialogue data from Final Fantasy XV
├── hades.py # script for cleaning dialogue data from Hades
├── horizon_forbidden_west.py # script for cleaning dialogue data from Horizon Forbidden West
├── horizon_zero_dawn.py # script for cleaning dialogue data from Horizon Zero Dawn
├── merge.py # script for mergeing cleaned data
├── persona_3.py # script for cleaning dialogue data from Persona 3
├── persona_4.py # script for cleaning dialogue data from Persona 4
└── persona_5.py # script for cleaning dialogue data from Persona 5
- Clone the repository.
git clone https://github.com/naivetoad/MACSS-Thesis.git- Change the working directory.
cd MACSS-Thesis- Download and install the latest release of Python 3.10 from the official website.
- Install Python libraries
pip install pandas tqdm transformers- Download raw data at https://github.com/seannyD/VideoGameDialogueCorpusPublic.
- Clean data for each game (replace {game_title} with a specific game's folder name).
python3 scripts/data_cleaning/{game_title}.py- Merge cleaned data from all games.
python3 scripts/data_cleaning/merge.py- Perform emotion classification on merged data.
python3 scripts/data_cleaning/emotion_classification.py- Download and install the latest releases of R and RStudio from the official website.
- Install R libraries.
install.packages(c(
"broom",
"fmsb",
"jsonlite",
"MASS",
"proxy",
"reshape2",
"tidyverse"
))- Change the working directory (replace {file_path} with the path to the folder where you cloned the repository).
setwd("{file_path}/MACSS-Thesis")- Perform exploratory data analysis by running
exploratory_data_analysis.R. - Perform analysis on emotion variables by running
emotion_analysis.R. - Perform analysis on LIWC variables by running
liwc_analysis.R. - Perform PCA on emotion and LIWC variables by running
pca_analysis.R.