Repository navigation
feat(search): highlight the found line by meaning, without the query's words - #684
Merged
Merged
Conversation
…s words A search highlights the way the meaning finds it: in the found line alone, the passage closest in meaning, and none of the query's words, in the results' snippets, their preview and the smart find. A quoted search keeps its words. - HybridSearchEngine: highlightsByMeaning for any non-quoted query; snippets shown without bold, then every hit's snippet laid out on the passage of its found line (not of the neighbors a short line's snippet carries). - Preview: the neighbors are no longer highlighted, the found line shows the passage. - seforim-semantic 0.5.0 finds that passage in ~6 ms per result instead of ~70 (a static distillation ranks the clauses, the model reranks the best 2): ~4 ms per result end to end, +10 MB native memory. - SeforimLibrary with the highlightsByMeaning hook (#132). - SearchBench reports the refine cost per result and the process memory. Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
…ight-everywhere Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com> # Conflicts: # gradle/libs.versions.toml
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
A search now highlights the way the meaning finds it: in the found line alone, the passage closest in meaning, and none of the query's words. This applies to the results' snippets, their preview and the reader's smart find. A quoted search is unchanged: its words, everywhere.
Changes
HybridSearchEnginehighlightsByMeaningis true for any non-quoted query.PassagePreview): neighbor lines are no longer highlighted; the found line shows the passage.SearchEngine.highlights(one logic for every view).seforim-semantic0.5.0: finds that passage in ~6 ms per result instead of ~70. A static distillation of the model ranks the clauses; the model reranks only the best 2.highlightsByMeaninghook and the hit line bounds (feat(search): highlight a found line by meaning, without the query's words SeforimLibrary#132).SearchBench: reports the refine cost per result and the process memory.Measured (
SearchBench, pages of 25, dev DB)Tests
jvmTest: everything passes exceptWidgetSizesScreenshotTestandCopyWithSourceE2ETest.talmud_multi_line_selection_trims_both_ends, which fail the same way on currentmaster(unrelated to this change).