This crate provides a loader for pre-compiled wordfreq models, allowing you to easily create wordfreq instances for various languages.
https://docs.rs/wordfreq-model/
The source code is licensed under either of
at your option.
The model files are distributed here together with the credits.
We describe how to reproduce the model files and source code (especially for myself).
Download the wordfreq repository and checkout the version 3.0.2 (if you want to reproduce our environment).
shell
$ git clone https://github.com/rspeer/wordfreq.git wordfreq-orig
$ cd wordfreq-orig
$ git checkout v3.0.2
$ cd ..
Convert the model files to this crate's format.
shell
$ python -m venv venv
$ source ./venv/bin/activate
$ pip install -r scripts/requirements.txt
$ scripts/convert.sh
Generate the source code according to the model files (maybe this should be done in rust-macro).
shell
$ python scripts/gen_codes.py