Universals of word order reflect optimization of grammars for efficient communication
This repository contains all code and results from the paper.
Code for reproducing statistical analyses and figures is in
Code for running the neural network models and the control studies reported in SI is in
Grammar parameters and efficiency scores for all grammars are in
Most analyses only require:
- R: We used version 3.5.1. Analyses require the packages
Creating optimized grammars, or evaluating the efficiency of grammars, requires:
- Python 2.7
- PyTorch, with CUDA. We used PyTorch Version 0.4.1 for experiments, though the code is compatible with more recent versions.
- Extracting real grammars from actual orderings found in corpora additionally requires Pyro.
- For the Universal Dependencies corpus data, see