Skip to content

Data & code for the paper 'Why do some words have more meanings than others? A true neutral model for the meaning-frequency correlation.'

License

Notifications You must be signed in to change notification settings

alexeykosh/Why-do-some-words-have-more-meanings-than-others

Repository files navigation

Data & code for the "Why do some words have more meanings than others? A true neutral model for the meaning-frequency correlation" paper.

This repository contains data & code for the "Why do some words have more meanings than others? A true neutral model for the meaning-frequency correlation" paper.

1. Contents

Thus repository contains the following:

  • analysis.R -- the R script used for plotting figures 1 to 3 and running the Spearman correlations.
  • data -- folder that contains data generated by the model and the .pkl files used for the heatmap plot.
  • figures -- folder that contains figures used in the paper
  • heatmap.py -- the Python script that generates Figure 4
  • requirements.txt -- Python requirements needed to run the model
  • src -- folder that contains the NeutralModel.py script, which is used to run the model described in the paper
  • wordnet-ratio.py -- Python script used to compute the wordnet number of types to total number of meanings ratio
2. Reproducing the analysis

The model presented in the paper can be run using Python 3. First, install the required packages from requirements.txt:

pip install -r requirements.txt

Then, you can run the model like so:

python3 src/NeutralModel.py --N=100 --S=200 --mu=0.02 --k=0.04 --p=1000 --t=300

The parameters can be replaced by arbitrary values, and the results will be saved in the model-data folder.

About

Data & code for the paper 'Why do some words have more meanings than others? A true neutral model for the meaning-frequency correlation.'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published