Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


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

Copyright 2015-2016 Rachel Rudinger. All rights reserved. This software is released under the 2-clause BSD license. See nachos/LICENSE.

Nachos is a tool integrating a number of different methods for learning narrative chains as originally introduced in "Unsupervised Learning of Narrative Event Chains." (Chambers et al., 2008)

If you use this code, please cite its accompanying paper, "Learning to predict script events from domain-specific text" by Rudinger et al., 2015 with the following bibtex:

@InProceedings{rudinger-EtAl:2015:*SEM2015, author = {Rudinger, Rachel and Demberg, Vera and Modi, Ashutosh and {Van Durme}, Benjamin and Pinkal, Manfred}, title = {Learning to predict script events from domain-specific text}, booktitle = {Proceedings of the Fourth Joint Conference on Lexical and Computational Semantics}, month = {June}, year = {2015}, address = {Denver, Colorado}, publisher = {Association for Computational Linguistics}, pages = {205--210}, url = {} }

(This paper provides the mathematical details for the models implemented in Nachos, as well as back-references to the papers in which these models were introduced.)

Code Usage:

Nachos runs with Python 2.7 and has not been tested on later versions. It requires installation of the python package "dill" (for caching models), which can be installed with the pip package manager:

pip install dill

The main nachos script is src/

To get info on all command-line arguments for nachos:

cd src

python --help

Basic usage - To build a basic PMI narrative chains model and run a narrative cloze evaluation using the sample training and test data provided:


(Example) To learn an ordered pmi model using the skip-3 counting method (Jans et al., 2012) with a count threshold of 10 training on only the longest coref chains in each document:

python -model ordered_pmi -threshold 10 -skip 3 -coref longest

To cache a model:

python -model_out MODEL_FILENAME

To read the provided sample model instead of training one:

python -model_in ../models/sample_model.dill

Training data:

The file sample_data/file_list contains a list of the (gzipped) training files for nachos to process during training. Edit this file to point nachos at a different (user-specified) set of (gzipped) training files.

Narrative cloze test data:

The file sample_data/cloze_tests/sample_cloze contains a small number of sample narrative cloze tests which are used by default. To specify your own narrative cloze test file:

python -cloze_file CLOZE_FILE

The provided cloze file must be in the correct format. To generate your own narrative cloze files, use scripts/ (Details provided in script.)


Integrated tool for learning narrative chains a la Chambers and Jurafsky, 2008.







No releases published


No packages published