Frequency starter decks

Prebuilt “most common words” decks per Bridge language (#379), owned by the Immersive library user (User::IMMERSIVE_USER_ID) and public, so every new learner has an immediate, credible starting deck. They also give the daily review email (#378) something to send to fresh accounts once copied.

Shape

For each ordered (target, fluent) language pair, three decks chunked by frequency rank so learners never double-study a word:

source_key cards
frequency:<t>:<f>:1-500 ranks 1–500
frequency:<t>:<f>:501-1000 ranks 501–1,000
frequency:<t>:<f>:1001-5000 ranks 1,001–5,000

Deck titles are localized (decks.frequency.title + languages.*): target_title in the target language, fluent_title in the learner’s language. decks.source_key is the stable machine identifier - re-imports find decks by it, never by title.

Each card is a WordCard whose seq is the frequency rank; target and fluent Word rows are owned by the Immersive user and flagged common. Audio uses the existing generate-on-demand flow - nothing is pre-generated. System decks are not Anki-exportable; learners copy a deck (Deck#copy_to_user) to study it.

Data and provenance

Word lists live in db/imports/frequency_lists/<lang>.txt (top 5,000, cleaned); source and licence in SOURCES.md alongside them (hermitdave/FrequencyWords, OpenSubtitles 2018, CC-BY-SA-4.0).

Running

bin/rails "frequency_decks:import[fr,en]"   # one pair
bin/rails frequency_decks:import_all        # all 30 ordered pairs

Glosses come from Resources::API::TranslateTextService. In development FakeAI substitutes marker text, so real imports run in production (or LIVE_MODE=true). Runs are idempotent: existing cards are skipped, failed translations are logged, skipped, and filled by the next run.


This site uses Just the Docs, a documentation theme for Jekyll.