Skip to content

refactor(conventions): improve title_case detector to reach 100% - #1711

Open
classiqdor wants to merge 2 commits into
mainfrom
fix/title-case-remaining
Open

refactor(conventions): improve title_case detector to reach 100%#1711
classiqdor wants to merge 2 commits into
mainfrom
fix/title-case-remaining

Conversation

@classiqdor

Copy link
Copy Markdown
Contributor

Summary

Improves the title_case detector to properly handle edge cases and reach 100% compliance.

Detector improvements:

  • Strip LaTeX math ($...$, $$...$$) before extracting words
  • Strip code spans (`...`) before extracting words
  • Strip HTML tags and markdown link URLs
  • Ignore minor words (a, the, of, in, via, as, from, etc.)
  • Ignore single letters (math variables like b, x)
  • Ignore ordinal suffixes (1st, 2nd, 3rd, 4th)
  • Support accented characters (À-ÿ) for names like Ampère
  • Load proper names whitelist from title_case_proper_names.txt

Notebook fixes:

  • Convert sentence-style headings to bold paragraphs (cooling_systems_optimization, ND_Laplacian_BE, quantum_walks)
  • Add backticks around code identifiers in headings (vlasov_ampere_qiskit, qml_with_classiq_guide)

Whitelist file:

Added .internal/conventions/title_case_proper_names.txt for proper names with unconventional casing (qDRIFT, iQuHack).

Test plan

  • python .internal/conventions/report.py --rule title_case shows 100%
  • Verify notebooks render correctly

🤖 Generated with Claude Code

Apply title case to markdown headings:
- quantum_thermal_state_preparation: fix $\delta$-time → $\delta$-Time
- projected_based_embedding_tutorial: 15 headings fixed
- select_structures_BE: 1 heading fixed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@classiqdor
classiqdor force-pushed the fix/title-case-remaining branch 2 times, most recently from 063106e to 622e244 Compare August 13, 2026 11:50
},
{
"cell_type": "markdown",
"id": "14",

@TomerGoldfriend TomerGoldfriend Aug 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange, maybe we shall put it just as text.


Reply via ReviewNB

Detector improvements:
- Strip LaTeX math ($...$, $$...$$), code spans, HTML tags, markdown links
- Ignore minor words (a, the, of, in, via, as, from, etc.)
- Ignore single letters (math variables like b, x)
- Ignore ordinal suffixes (1st, 2nd, 3rd, 4th)
- Support accented characters (À-ÿ) for names like Ampère
- Load proper names whitelist from title_case_proper_names.txt (lazy load)

Notebook fixes:
- Convert sentence-style headings to bold paragraphs (not headings)
- Add backticks around code identifiers in headings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@classiqdor
classiqdor force-pushed the fix/title-case-remaining branch from 622e244 to b5fdbfa Compare August 13, 2026 13:09
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.

2 participants