[codex] Use reading exposure in card ranking - #7
Draft
bee-san wants to merge 1 commit into
Draft
Conversation
bee-san
force-pushed
the
codex/reading-exposure-ranking
branch
from
June 17, 2026 10:17
1d4d82a to
aba439a
Compare
bee-san
force-pushed
the
codex/reading-exposure-ranking
branch
from
June 17, 2026 10:21
aba439a to
4fa2f92
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
collection.media.readingExposureWeight.Details
The sorter now reads
_reading_exposure_words.json.gzfromcollection.mediawhen present._reading_exposure_manifest.jsonis 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.gzfor 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 testspython scripts/package_addon.pygit diff --check origin/main...HEADandgit diff --check/home/bee/.local/share/Anki2/User 1/collection.medialoaded 8,598 exposure entries with no warnings.