Skip to content

mbwsims/literary-information-propagation

Repository files navigation

Measuring Information Propagation in Literary Social Networks

Code to support the paper "Measuring Information Propagation in Literary Social Networks"

The code included here can be used to run the full pipeline (minus analysis scripts - to be added soon) on a single book. With minimal adaptation, this code can also be used to run the pipeline on a full corpus.

Core dependencies: python3, pytorch, pytorch_pretrained_bert, numpy, pandas, networkX

To download the entity recognition and coref models, first install gdown (pip install gdown) and then run:

python download_models.py

The models will automatically be saved to the correct locations.

Then to run the full pipeline on an included example novel, run the following from the command line:

./run_pipeline.sh 1586

1586 refers to the 1586.tokens file that's been included in the tokens folder. This file is the output of running the selected novel through BookNLP.

Note that a BookNLP tokens file input is a prerequisite for running the pipeline. Code and directions for using BookNLP can be found here.

Finally, all output from running the pipeline on the included example file will be saved to a resulting folder simply titled output.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published