Code for "Miller’s Monkey Updated: Communicative Efficiency and the Statistics of Words in Natural Language"
Cognition (2020). https://doi.org/10.1016/j.cognition.2020.104466
Please email either of the first authors if you have any questions. Our emails are provided in the paper.
- Python code is written in version 2.7 with no external libraries.
- R scripts have been tested on version 4.0.2. The following R packages are required to create the plots and run statistical analysis. The scripts will attempt to install them automatically:
cowplot
,ggplot2
,Hmisc
,scales
,reshape2
,tidyr
,dplyr
,plyr
,pracma
,RColorBrewer
,ggvoronoi
,ggforce
,lme4
,stringr
.
No other setup is required.
The following script runs all generation and analysis:
$ runall.sh
Baayen, R. H., Piepenbrock, R., & Gulikers, L. (1995). The CELEX lexical database (release 2). Distributed by the Linguistic Data Consortium, University of Pennsylvania.
Princeton University. (2010). "About WordNet." WordNet. Princeton University.