Skip to content

[codex] Use reading exposure in card ranking - #7

Draft
bee-san wants to merge 1 commit into
mainfrom
codex/reading-exposure-ranking
Draft

[codex] Use reading exposure in card ranking#7
bee-san wants to merge 1 commit into
mainfrom
codex/reading-exposure-ranking

Conversation

@bee-san

@bee-san bee-san commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Load optional generic Reading Exposure Exporter word media from Anki collection.media.
  • Blend exposure recency/frequency into card ranking with configurable readingExposureWeight.
  • Surface exposure score/count fields in sort previews and document the behavior.

Details

The sorter now reads _reading_exposure_words.json.gz from collection.media when present. _reading_exposure_manifest.json is supported for contract validation, but exporters should use the standard generic word filename rather than custom paths. The loader also falls back to legacy _kani_reading_exposure_words.json.gz for compatibility. Missing files are ignored; malformed existing files are reported in sort warnings.

The ranking signal favors recent exposure first, then 14/31-day windows, with a small lifetime-count component. It is additive to the existing frequency score and defaults to a modest weight of 0.18.

Validation

  • python -m unittest discover -s tests -p 'test_*.py' -v (121 tests)
  • python -m compileall addon/anki_sorter tests
  • python scripts/package_addon.py
  • git diff --check origin/main...HEAD and git diff --check
  • Live read check against /home/bee/.local/share/Anki2/User 1/collection.media loaded 8,598 exposure entries with no warnings.

@bee-san
bee-san force-pushed the codex/reading-exposure-ranking branch from 1d4d82a to aba439a Compare June 17, 2026 10:17
@bee-san
bee-san force-pushed the codex/reading-exposure-ranking branch from aba439a to 4fa2f92 Compare June 17, 2026 10:21
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant