Skip to content

Match spoken punctuation as whole words and stop auto-listing numbers#3

Merged
collectifweb merged 1 commit into
mainfrom
fix/heuristic-polish-glitches
Jul 3, 2026
Merged

Match spoken punctuation as whole words and stop auto-listing numbers#3
collectifweb merged 1 commit into
mainfrom
fix/heuristic-polish-glitches

Conversation

@collectifweb

Copy link
Copy Markdown
Owner

What

Two glitches in the heuristic polisher (the default polish_backend, so this hits anyone dictating without Ollama):

  • Spoken punctuation was matched as a substring, not a whole word. Any word containing a mark keyword got mangled: commande, nde, colonne: ne, and likewise colonel, colonie, colonisation… (colon = English colon was the worst offender in French). Marks are now matched only as whole words, so dictating comma / virgule between two words still works.
  • Numbers dictated in a sentence were reformatted into a numbered list. The heuristic fired on any 1 <word> and pushed every digit onto its own line — il y a 1 chien et 2 chats became a list. On speech input it was almost only false positives, so the heuristic is dropped; numbers stay inline.

Tests

  • Added regression tests for both cases (whole-word marks, inline numbers).
  • Full suite green: 47 tests.

The heuristic polisher replaced spoken marks (comma, colon, virgule, ...)
by plain substring search, so any word containing one was mangled:
"commande" became ", nde", "colonne" became ": ne", and so on for
colonel, colonie, colonisation. Match these marks only as whole words.

Also drop the numbered-list heuristic: it fired on any "1 <word>" and
reformatted every digit in the sentence onto its own line, so numbers
dictated in prose ("il y a 1 chien et 2 chats") turned into a list. On
speech input it produced almost only false positives.

Add regression tests for both.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@collectifweb
collectifweb merged commit 144118f into main Jul 3, 2026
4 checks passed
@collectifweb
collectifweb deleted the fix/heuristic-polish-glitches branch July 3, 2026 16:35
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