Skip to content

m-hahn/grammar-optim

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

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 results. Code for running the neural network models and the control studies reported in SI is in models. Grammar parameters and efficiency scores for all grammars are in grammars.

Requirements

Most analyses only require:

  • R: We used version 3.5.1. Analyses require the packages brms, lme4, tidyr, dplyr, ggplot2.

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 models/corpus_reader/README.md for instructions.

About

Code and Results for "Universals of word order reflect optimization of grammars for efficient communication"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published