Repository navigation
Restructure package layout and optimize SQLite lookups - #4
Merged
Merged
Conversation
Split mega-modules into types/scoring/lookup/grammar/output packages, add covering indexes and query batching while preserving scoring equivalence, and document the system under .cursor. Co-authored-by: Cursor <cursoragent@cursor.com>
Prefix prune used break, so forms like 食べたい never reached suffix lookup; keep collecting substrings for suffixes and only skip DB IN-lists. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep only the original trie membership filter for DB lookups; suffix compounds stay on the same path as before the restructure. Co-authored-by: Cursor <cursoragent@cursor.com>
Grow the equivalence snapshot to 40 sentences, run pytest on PRs, clear scoring caches on shutdown, and remove leftover restructure dead code. Co-authored-by: Cursor <cursoragent@cursor.com>
Mocked CLI tests now pass a real temp --database path so setup prompts are skipped; upgrade checkout/setup-python to v6. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
grammar/,lookup/,scoring/,output/,types.py) while keeping the public API and shim modules stable.Validation
main: 200/200 LLM-eval sentences identical on top-path splits, readings, and scores (scripts/ab_split_equivalence.py).analyze~12–20% faster;warm_up()~96% faster (persisted trie); cold first-call withoutwarm_up~19% slower — prefer warming at process start.Test plan
pytest tests/ -x --tb=shortwithHIMOTOKI_DB_PATHsetpython -c "import himotoki; himotoki.warm_up(); print(himotoki.analyze('学校で勉強しています')[0][0])"python3 scripts/ab_split_equivalence.py -n 200against amainworktree