Repository navigation
Search: a result lights and goes to its own written word - #284
Merged
Merged
Conversation
Opening a transcript match from Search this notebook (or its sidebar list)
now marks that match's own ink as current and glides there, instead of
lighting the page's hits alike and landing on the first one. Each match of
the transcript is lined up with this device's reading on its own
(transcriptMatchInk), so the list's nth result is its own place even when
the reading found more or fewer words than the transcript.
Also:
- each of a page's transcripts (the note's own entry, the AI's sidecar) is
lined up separately: joined, a word at the start of the second took the
end of the first as context and lit nothing ("CRT", Algebra p14);
- LaTeX command names (\cdot, \frac) and the AI's own bracketed notes are
left out of the alignment; \gcd, \log and \bmod keep what was written.
Measured on the vault's 14 notebooks (tests/bench/search-marks.ts, Grape's
learned model): results that steer to their own spot 6.6% -> 93.0% of
13,316 matches; transcript words lighting nothing 6.5% -> 6.2%.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the device reading holds the searched word exactly and the
transcript's alignment points at other ink altogether (no stroke in
common), only the reading's word lights (`preferReading`). A results-list
match whose ink is not lit no longer becomes the current mark
(`withFocusInk` picks the lit word sharing most strokes, or none).
Measured on the vault's 14 notebooks: 11 of 4,989 words change. The kept
Grape ink was right in 11 of 11 (judged by eye on crops); the dropped
transcript ink was wrong in 5, a second correct place in 4, unclear in 2.
Words lighting nothing stay at 6.2%; results that steer to their own
word 93.0% -> 92.9%. Test built from Network lecture notes p20 ("flags").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Joost's feedback page (21 Nov): "Make sure transcription also marks and puts location of words in search."
What changes
transcriptMatchInk(pure,src/search/hit-strokes.ts) lines each transcript match up with the reading on its own, in the ordersearch-results.tscountsnth.\cdot,\frac) and the AI's bracketed notes are left out of the alignment;\gcd,\log,\bmodkeep the letters that were written.Measured on the vault (read-only),
tests/bench/search-marks.ts171 pages with a transcript in 14 notebooks, Grape's learned model with page words:
Algebra 94.4% / 3.9%, Network 97.3% / 1.1%. Most words still dark are the AI's descriptions of the page ("Division of … by …: quotient"), not ink.
Where Grape and the transcript disagree (2de22f3, Joost: "apply tweak")
When Grape's reading holds the word exactly and the transcript's alignment points at other ink altogether, only Grape's word lights (
preferReading); a result whose ink is not lit is never made current. 11 of 4,989 words change: the kept Grape ink was right 11/11 (judged on crops), the dropped transcript ink wrong in 5, a second correct place in 4, unclear in 2. Dark words stay 6.2%; steering 93.0% → 92.9%. Test from Network lecture notes p20 ("flags").Not covered
Review page: https://claude.ai/artifact/3B9qVRmMbNpvTe78uvnhEc
Gates run locally: lint, lint:review, lint:css, typecheck, test, build.
🤖 Generated with Claude Code