# Attribution: ReadStair lexicon

`bands.tsv`, `forms.tsv` and `vocab.tsv` are generated by `tools/make-lexicon.py` (no network access) from:

- wordfreq 3.1.1, Copyright 2022 Robyn Speer (https://github.com/rspeer/wordfreq, DOI 10.5281/zenodo.7199437), `large_en` word list, licensed under CC BY-SA 4.0, read through the pip package `wordfreq==3.1.1`.
- New General Service List 1.2 by Browne, C., Culligan, B., and Phillips, J. (https://www.newgeneralservicelist.com/new-general-service-list), licensed under CC BY-SA 4.0: `Data/ngsl/NGSL_12_stats.csv` (sha256 `2098bab8955a120a9766c6282a51d7d578c6cb0a7d946600d2ffb73ba25a0b44`) and `Data/ngsl/NGSL_12_lemmatized_for_research.csv` (sha256 `d814f2a0a3c61479a2c5ad037661719a0cc6e7dbcde31f181b54f12d0f1e11a4`).
- WordNet 3.0, Princeton University (https://wordnet.princeton.edu/), under the WordNet 3.0 license (see LICENSE): `Data/wordnet/wordnet-extract.tsv` (sha256 `ea84e3f3ba707d2a86be88ab7be8dc6cbb894be25f09bd9afad410a15d330af9`), extracted from `WordNet-3.0.tar.gz`
  (sha256 `640db279c949a88f61f851dd54ebbb22d003f8b90b85267042ef85a3781d3a52`).
- Reviewed lemma decisions written for ReadStair: `Data/lexicon/overrides.tsv` (sha256 `b3d7fffafa6e35955982c3b024ba8a502d9f18c766ba08665403ba5251fd738c`).

| File | Rows | Bytes | sha256 |
|---|---|---|---|
| `bands.tsv` | 25,000 | 261,728 | `1218cd3f913ae01e03ca85f6214ed5defc42ea57b2af93999641636250ee14a1` |
| `forms.tsv` | 20,242 | 340,248 | `7778cd2c8b4f3fbe43b73448fafb07cfc5f016afc4cb850fd176cdc864bf360d` |
| `vocab.tsv` | 600 | 6,794 | `35a1029fbd07e8d8eba479e0685ad2c00bb05778537c9ab8d975b7c5022d14fa` |

## Changes made

- Kept wordfreq's words made of Latin-script letters (accents allowed, as in "café"), optionally joined by apostrophes.
  wordfreq splits hyphenated words, so no row is hyphenated.
- Grouped word forms under lemmas (dictionary headwords). WordNet's irregular forms and suffix rules propose lemmas, with
  guards so that a word is not read as a different, shorter word (wed is not we, hiss is not his, james is not jam); NGSL
  word families choose between the proposals; a British spelling folds into an American one that shares a WordNet synset
  and is at least half as frequent (colour -> color); only a word's own paradigm folds into a function word; reviewed
  decisions follow; last, the -ings plural of an -ing form that reads as a verb stays a noun of its own (sayings).
- Summed the frequencies of the forms the app reads as each lemma, ranked the lemmas (number words first, since books print
  most numbers as digits) and replaced frequencies with bands: `band = rank // 1000 + 1` for the 25,000 most frequent
  lemmas (bands.tsv).
- forms.tsv lists each form of Zipf 2.0 or more that reads as another lemma: one in bands.tsv, or one beyond it that
  is itself that frequent (waistcoats -> waistcoat). A contraction lists its parts, alternatives joined by `|`
  (`can't` -> `can not`, `i'd` -> `i would|have`); a few old contractions are listed at any frequency (`ma'am` -> `madam`).
- vocab.tsv holds 20 words for each band, picked by rule and spaced evenly by rank (WordNet senses and flags; NGSL
  band for bands 1-3; none offensive, made of an easier word, or rejected on review as a name), and 100 pseudowords
  (band 0) made by swapping letter groups of easy words, kept only if they are not near a real word and are as word-like
  as real words of bands 21-25. Pseudowords approved on review stay while they pass these rules; ones rejected on review
  are left out.
- Decisions of this build: 261 -ings nouns, 149 base words, 36 closed-class blocks, 96 contractions, 638 spelling folds.

Build constants: SIZE 25000, WIDTH 1000, MIN_ZIPF 2.0, RATIO 0.1, T_BASE 0.25, DOM 1.0, SEED 20260922.

## Upstream sources credited by wordfreq

As wordfreq's license asks, ReadStair credits the sources wordfreq is built on:

- **SUBTLEX** word lists by Marc Brysbaert et al., http://crr.ugent.be/programs-data/subtitle-frequencies.
  SUBTLEX is freely available data. English lists used through wordfreq:
  - Brysbaert, M. & New, B. (2009). Moving beyond Kucera and Francis: A Critical Evaluation of Current Word
    Frequency Norms and the Introduction of a New and Improved Word Frequency Measure for American English.
    *Behavior Research Methods*, 41(4), 977-990.
  - van Heuven, W. J., Mandera, P., Keuleers, E., & Brysbaert, M. (2014). SUBTLEX-UK: A new and improved word
    frequency database for British English. *The Quarterly Journal of Experimental Psychology*, 67(6), 1176-1190.
- **Google Books Ngram Viewer**, http://books.google.com/ngrams (and Google Books Syntactic Ngrams).
- **OPUS OpenSubtitles 2018**, http://opus.nlpl.eu/OpenSubtitles.php, from the OpenSubtitles project,
  http://www.opensubtitles.org/.
- **The Leeds Internet Corpus**, University of Leeds Centre for Translation Studies, http://corpus.leeds.ac.uk/list.html.
- **Wikipedia**, http://www.wikipedia.org.
- **ParaCrawl**, https://paracrawl.eu.
- Word statistics collected from the Twitter streaming API (statistics only; no Twitter content is republished).
