LING380: Topics in Computational Linguistics Final Project
James Cross (j.cross@yale.edu) and Daniel Kim (d.j.kim@yale.edu), December 2021
Two options available to run the code; on Google colab and/or locally on your machine.
Model evaluation/analysis notebook
Notebooks: You can run the model_training.ipynb
or model_evaluation.ipynb
notebooks on your local machine. Directory paths will have to be adjusted as needed.
data
: contains medical transcriptions and other medical report data used in model fine-tuning and analysis, clinical stop words, and saved accuracy and entropy metrics during evaluationnotebooks
:
model_training.ipynb
: code to train and fine-tune BERT and BioBERTmodel_evaluation.ipynb
: code to run various model evaluations, visualize word importances, perform post-training clinical stopword masking, and other analysesscripts
: same functionality as in the notebooks, in executable python scripts / functions
models
: where checkpoints of the best performing BERT and BioBERT models after hyperparameter optimization are stored
All packages needed to run the code are available in the default Google Colab environment (see documentation for full list), with the exception of huggingface (transformers
), used for loading transformer models, and captum.ai (captum
), which provides access for a variety of model interpretation tools.