Build LingQ Premium

KINDAreplaces $14.99/mosaves $179.88/yrback to the verdict

0%0 of 20 items done

Saved on this device only. Tick prerequisites first, then work the phases in order · do not start one until the checks above it pass.

Import text and optional aligned audio, read with unknown words highlighted, look a word up and save it with its sentence as context, and review saved words on a spaced schedule that treats a word met in reading as a review, with progress measured in words you have actually seen.

estimated effort multi-daythe files for this build are in the project pack

RuntimeTypeScript with Vite, installable and offline capableStorageIndexedDB locally with export, no account requiredTokenisationIntl.Segmenter for word segmentationSchedulingAn open spaced repetition algorithm you can readAudioOptional aligned audio with sentence-level timings

Before step 1

Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.

  1. installfree

    Why Runs the build.

    Get it nodejs.org, or nvm install 22. open ↗

    Verify node --version prints v22 or higher

  2. have readyfree with openly licensed material

    Why The whole build works on your material, and importing something you may not use is both the wrong thing and legally your problem rather than a platform's.

    Get it Openly licensed texts, books you have bought in a format you can read, or your own writing. Record the source for each.

    Verify At least three texts with recorded licence notes

  3. have readyfree with an open dictionary

    Why Lookups should work offline and without a service. A licensed dictionary file makes the tool self-contained.

    Get it Use an openly licensed bilingual dictionary in a format you can parse, and record its licence.

    Verify A lookup returns a gloss with no network access

  4. have readyfree

    Why Phase 1's segmentation check is meaningless without one, and a naive tokeniser looks correct until it meets one.

    Get it A short openly licensed passage in Japanese, Chinese or Thai. You do not need to read it to check that segmentation produced words rather than one long token.

    Verify Segmentation produces plausible word boundaries in it

  5. have readyfree

    Why Reading and reviewing happen in gaps, away from a desk, often with no signal. Desktop-only testing will produce a tool you do not use.

    Get it Serve over HTTPS with a tunnel and install to the home screen.

    Verify It installs and works with networking disabled

Data model

Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.

- texts(id, title, language, source, imported_at, word_count, licence_note)
- sentences(id, text_id, ordinal, content, audio_start_ms, audio_end_ms)
- tokens(id, sentence_id, ordinal, surface, lemma) · lemma where you have a lemmatiser, surface otherwise
- lexemes(id, language, form, status, first_seen_at, last_seen_at, seen_count) · status is unknown, learning, known or ignored
- meanings(id, lexeme_id, gloss, note, source) · your own note, or one you looked up
- contexts(lexeme_id, sentence_id, saved_at) · the sentence you met it in, which is what makes review work
- reviews(id, lexeme_id, at, grade, next_due_at, interval_days, ease)
- A word met while reading counts as exposure and updates the schedule, because reading is the practice and reviewing is the backstop.

Environment variables

These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.

VariableNeededExampleWhere the value comes from
TARGET_LANGUAGErequiredjaThe language being studied. Drives segmentation, so it must be a locale the segmenter recognises.
DICTIONARY_PATHrequired/dict/ja-en.jsonLocal dictionary file. Bundled so lookups work offline.
REVIEW_DAILY_CAPrequired60Maximum reviews per session. An uncapped queue after time away is why people abandon this practice.
EXPOSURE_INTERVAL_FACTORrequired0.3How much a word met while reading extends its interval, relative to a graded review.
EXPORT_REMINDER_DAYSrequired21How often to prompt for an export, because browser storage can be evicted.

The build, in order

  1. Import and segment text properly

    A text you own becomes sentences and words, correctly, in your target language.

    1. Plain text, Markdown and EPUB. EPUB is structured already, which makes it the easiest good source.

      Files src/import/

    2. Sentence and word granularity, with the target locale. Test on a non-spaced language.

      Files src/segment.ts

    3. One line saying where this came from and why you may use it. It is a habit worth enforcing.

      Files src/import/index.ts

    done when · tick each as it passes
    watch out
    • Splitting on spaces works for some languages and produces nonsense for others, including Japanese, Chinese and Thai, where a sentence has no spaces at all. Intl.Segmenter handles word segmentation per locale, and testing against a non-spaced language is the check that catches a naive implementation.
  2. Reading with status visible

    Opening a text shows at a glance what you know and what you do not.

    1. Unknown prominent, learning subtle, known plain. Readability first.

      Files src/reader.ts

    2. A lexeme is per language, not per text. Learning a word in one book means knowing it in the next.

      Files src/lexemes.ts

    3. Seen count and last seen. Reading is the practice, so it must register.

      Files src/exposure.ts

    done when · tick each as it passes
    watch out
    • Colouring every word including known ones makes a page unreadable and defeats the purpose, which is to read. Known words should look like ordinary text; only what you have not learned should stand out.
  3. Lookup and saving with context

    Saving a word keeps the sentence you met it in, because that is what makes it learnable.

    1. A file you supply, so the tool works offline and without a service. A configured service is an addition rather than a requirement.

      Files src/dictionary.ts

    2. Your own words plus the sentence. Both, always.

      Files src/save.ts

    3. One lexeme, several contexts. This is what makes a word feel learned rather than memorised.

      Files src/contexts.ts

    done when · tick each as it passes
    watch out
    • A saved word without its sentence is a flashcard with no meaning attached, and reviewing bare word pairs is the least effective form of this practice. Always store the context sentence, and show it during review rather than the word alone.
  4. Review you can inspect

    Words come back on a schedule, and reading counts towards it.

    1. Documented, with the parameters visible. A schedule you cannot inspect is one you will stop trusting.

      Files src/srs.tsdocs/algorithm.md

    2. A smaller interval extension than a graded review. This is what keeps the queue honest.

      Files src/srs.ts

    3. A daily cap you set. An unbounded queue after a week away is why people stop.

      Files src/review.ts

    done when · tick each as it passes
    watch out
    • A review schedule that ignores reading will keep testing you on words you meet daily, which wastes review time on the words that need it least. Let exposure while reading count, with a smaller effect than a graded review, so the queue drifts towards what you genuinely are not meeting.
  5. Audio aligned to sentences

    You can listen while reading, and tapping a sentence plays it.

    1. If you have them, alignment is solved. Automatic matching is the fallback rather than the default.

      Files src/audio/align.ts

    2. Anchor on matches through the text rather than assuming a constant speaking rate.

      Files src/audio/align.ts

    3. Drift accumulates. The first chapter always looks fine.

    done when · tick each as it passes
    watch out
    • Automatic alignment drifts on a long recording, and by chapter three the highlight is a paragraph away from the audio. Align in chunks against transcript matches rather than assuming a constant rate, and verify alignment at the end of the longest text rather than the beginning.
what this build does not replace
after v1, if you want it

Need the files? The project pack on the verdict page hands your agent the whole brief · more education.