Skip to content

Split glossary lines before sentence splitting when chunking - #48

Merged
xquantize merged 1 commit into
developfrom
agent/glossary-line-splits
Oct 28, 2026
Merged

xquantize merged 1 commit into
developfrom
agent/glossary-line-splits

Conversation

@xquantize

Copy link
Copy Markdown
Owner

XQU-36: Keep newline-separated glossary entries as separate packing units so they are not glued into one sentence.

Acceptance criteria:

  • Two glossary lines joined by a single newline (first line has no .!?) are separate packing units. They may share a chunk when they fit, but neither line is glued into the other, and a whole entry is never split across chunks unless that one line exceeds max_words.
  • Close-out: A wave that breaks all at once. This leaves no shoulder. as one line under max_words stays a single packing unit (the second sentence does not detach).
  • Existing cap/overlap/tail-merge tests still pass without rewriting _sentences() helpers.
  • bash scripts/check.sh prints CHECK PASSED
  • Only src/swellsense/processing/chunk.py and tests/test_chunk.py are changed

Review: all checks passed. check.sh: CHECK PASSED locally.

Made with Cursor

Line breaks within a paragraph are packing boundaries so multi-line
glossary entries are not glued; short lines keep multiple sentences intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xquantize
xquantize merged commit 5c375a1 into develop Oct 28, 2026
1 check passed
@xquantize
xquantize deleted the agent/glossary-line-splits branch October 28, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant