Repository navigation
Improve model setup and punctuation formatting - #532
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f01b67c813
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| return self.cleanSymbolCommaNoise(in: self.render(output)) | ||
| } | ||
|
|
There was a problem hiding this comment.
Require context before converting bare “dot”
Because this formatter is now applied to dictation output by default before the text is returned, this unconditional bare dot rule will rewrite ordinary prose such as “the polka dot dress” into “the polka.dress” because .noSpaceAround removes the surrounding spaces. Please require code/contact context for dot (similar to the plus/equals rules) or avoid converting the bare word globally.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0816b13012
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private static func shouldRemoveComma(previous: Character?, next: Character?) -> Bool { | ||
| let isNextToSymbol = previous.map { self.symbolCommaCleanupCharacters.contains($0) } == true || | ||
| next.map { self.symbolCommaCleanupCharacters.contains($0) } == true | ||
| let isBetweenPunctuationPair = previous.map { self.punctuationPairCommaCleanupCharacters.contains($0) } == true && | ||
| next.map { self.punctuationPairCommaCleanupCharacters.contains($0) } == true | ||
| return isNextToSymbol || isBetweenPunctuationPair |
There was a problem hiding this comment.
Preserve commas next to existing symbols
When auto-convert punctuation is enabled, cleanSymbolCommaNoise runs over the whole transcript, including punctuation that the ASR model or user intentionally produced. This predicate removes any comma whose previous or next non-whitespace character is in the symbol set, so normal text like Thanks, @Sam or Use C++, now loses the comma even though it was not generated as symbol noise. Please limit this cleanup to commas introduced between converted symbol tokens, or otherwise require tighter context.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 593e465400
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| symbol: "/", | ||
| spacing: .noSpaceAround, | ||
| phrases: ["slash", "forward slash", "forwardslash"] | ||
| ) + |
There was a problem hiding this comment.
Preserve command spacing for spoken slash
When Auto-Convert Punctuation is enabled, this bare slash rule runs before applySlashCommandFormatting; for a command utterance like “Run slash status”, the renderer uses .noSpaceAround and turns it into Run/status, so the later slash-command regex no longer sees a token-boundary /status and cannot produce the intended Run /status. Please either let slash-command formatting handle command-context slash phrases first or restrict the no-space slash conversion to URL/path-like contexts.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f14114c72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.rules( | ||
| symbol: "&", | ||
| spacing: .spaceAround, | ||
| phrases: ["ampersand", "and sign"] |
There was a problem hiding this comment.
Require explicit context for “and sign”
With auto-convert punctuation enabled by default, the and sign alias is indistinguishable from the normal verb phrase; dictating “review the document and sign it” matches this rule and renders as review the document & it, dropping the verb. Please limit this conversion to explicit “ampersand” or require symbol/code context.
Useful? React with 👍 / 👎.
| self.rules( | ||
| symbol: "$", | ||
| spacing: .leftAttached, | ||
| phrases: ["dollar sign", "dollar"] |
There was a problem hiding this comment.
Do not convert bare “dollar” in prose
The bare dollar alternative will match ordinary currency prose, and because $ is rendered with .leftAttached, phrases like “I found a dollar bill” become I found a $bill and “one dollar” becomes one $. Please keep this to the explicit “dollar sign” phrase or require numeric/symbol context before converting.
Useful? React with 👍 / 👎.
Description
Type of Change
Related Issue or Discussion
Closes #519
Testing
Screenshots / Video
Notes