Repository navigation
AI Chat: keep numbered chapter titles out of the survey wave check - #244
Merged
Merged
Conversation
Chapters of different reports often share a title ("Section 1: Views of
the mayor" in a 2010 and a 2011 report), so the gate offered them as two
waves of one report.
- Ambiguity_Gate::get_family_key() returns no family for a numbered
chapter title ("Section 1:", "Chapter 2.", "Part IV:", "3. …").
Titles that only start like one ("2024: The year in review", "Part of
the City 2024") still form families.
- Tests: test_numbered_chapter_titles_do_not_count.
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.
Description of the Change
The survey wave check (
Ambiguity_Gate, #243) groups passages by their page title, without years, to find several waves of one report. Chapters of different reports often share a title, though. For example, "Section 1: Views of the mayor" can be a chapter of a 2010 report and of a different 2011 report. The gate read those as two waves of one report and asked the reader to pick "2011 (Section 1: Views of the mayor)" or "2010 (Section 1: Views of the mayor)", which names chapters the reader cannot recognize.Ambiguity_Gate::get_family_key()now returns no family for a numbered chapter title: "Section 1: …", "Chapter 2. …", "Part IV: …", "3. …". Such pages are skipped, like generic titles (Methodology, Appendix).How to test the Change
Covered by
test_numbered_chapter_titles_do_not_count, which fails without the change.Changelog Entry
Credits
Props @felipeelia
Checklist:
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the cause on real content, writing the change and its test, and drafting this description. I reviewed the code and the test results before opening this PR.