Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Agent for Story Turn-taking using Event Representations

Code from the paper LJ Martin, P Ammanabrolu, X Wang, W Hancock, S Singh, B Harrison, and MO Riedl. Event Representations for Automated Story Generation with Deep Neural Nets, Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18), New Orleans, LA.

Disclaimer This code is not upkept.


Can be found here:

Event-to-Event and Event-to-Sentence files can be found in their respective folders. Within each, data files are located in folders that are numbered in the order that they are presented in the paper. Each of these nested folders contains files for test input, expected test output, and generated output (labeled accordingly).

Running the code:

Pruning and Splitting code To start a Stanford CoreNLP server, run: sh Run python to parse your data and then you can run python to prune and split.

Event Creation code takes separate NER and parse files, and extracts multiple events.

Note: The parsing code we have provided has combined the parses and NER into a single file. You will have to change these following files to match this format. Once you have the parses, you can run python for generalized events, or python for event bigrams with continuing named entities, or python to generalize the entire sentence.

You can also do topic modeling using LDA (in the folder Event_Creation/Topic_Modeling). After you adjust the input file, run python to create a model. Once the model is made, run python to find the top words in each topic or python to create data files that are separated by these new genres.

Event-to-Event code relies on Tensorflow 1.3, edit hyperparameters in and run using python 2.7 to train the model and use to decode.

Event-to-Sentence code is run using an Anaconda environment for Python 2.7. The environment is defined in Event-to-Sentence/environment.yml. Run conda env create -f environment.yml and then source activate aster to enter the correct environment.

All configurations can be done in config.json. Data is formatted as bi-text (one text file with the input sequences and another with the corresponding output sequences aligned by line number). Run the code using python --config config.json to train and python --config config.json to decode.


Agent for Story Turn-taking using Event Representations



No releases published


No packages published