Open
Conversation
Restores the split command that was absorbed into lookup -s. The key
behavioral difference: split() always runs the greedy segmentation
algorithm directly, while lookup -s tries an exact match first and only
splits as a fallback.
Changes:
- lib: add SplitOptions struct (lib/src/core/split.rs)
- lib: add perform_split() kernel and split() method to lookup! macro;
refactor perform_lookup() to delegate to perform_split() for deduplication
- lib: fix byte-boundary bug from original split implementation (now uses
char count instead of byte length for threshold comparison)
- lib: add split tests (lib/tests/split.rs)
- cli: add odict split command with -m/--min-length, -F, -i, -r flags
- serve: add GET /{name}/split HTTP endpoint
- node: add SplitOptions type and split() method on OpenDictionary
- node: add split tests
- python: add SplitOptions type and split() method on OpenDictionary
- python: add split tests
https://claude.ai/code/session_01VQ1ponG9b5YivzuUY9cJnd
Adds tests for: no matches, empty string, threshold behavior, multiple queries with order preservation, follow=false, follow=true (with directed_from verification), case-sensitive default, and case-insensitive mode. https://claude.ai/code/session_01VQ1ponG9b5YivzuUY9cJnd
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.
No description provided.