Light cleanup, the default style, stops deleting acronyms and hyphenated words
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
The filler regex is on the filler rule at DictationCleanup.swift:51, and its case-insensitivity comes from the rule compilation around line 40. Read the light cleanup path (DictationCleanup.light, then CleanupEngine.clean) and the existing cases in CleanupChecks.swift. Run LocalVoice --check-core (main.swift:848) before and after editing. Done when the five unchanged-word examples and the new umm/uhh/hmmm/erm filler check pass, and the existing checks still pass.
Written by the indexing model from the issue text.
Description
Outcome: Light cleanup, the default text style, removes spoken fillers and nothing else. 'ERM', 'HMM', 'UM', 'UH', 'Uh-huh' and 'Mm-hmm' come back exactly as dictated.
Evidence (train head 14d06bc)
- Every Light rule compiles case-insensitive (
DictationCleanup.swift:40). The filler rule at:51,\b(?:u+m+|u+h+|e+rm+|hmm+)\b[,\s]*, therefore also matches the acronyms ERM, HMM, UM and UH, and it stops at a hyphen. - Run through NSRegularExpression, the engine the app uses:
- 'We need to review the ERM framework.' becomes 'We need to review the framework.'
- 'Train an HMM on the data.' becomes 'Train an on the data.'
- 'The UM campus' becomes 'The campus'.
- 'Uh-huh, sounds good.' becomes '-huh, sounds good.'
- 'Mm-hmm, that works.' becomes 'Mm-that works.'
- Light is the default (
VoicePreferences.swift:74). Every dictation passes throughCleanupEngine.clean(AppModel.swift:652, thenCleanup.swift:22), and Natural starts from Light's output (Cleanup.swift:22-23). - Dictionary replacements run after cleanup (
AppModel.swift:656), so a dictionary entry cannot bring a deleted word back. - With live words on,
owned.finish(result)(AppModel.swift:689) replaces the live span with the cleaned result, so the deleted word also disappears from the field. - The contract calls Light conservative (
docs/dictation-comparison.md:15) and says all-caps acronyms keep their dictated spelling (docs/live-voice.md:64). CleanupChecks.swift:17-37has no acronym or hyphenated case.
Change
- Change only the filler rule at
DictationCleanup.swift:51. An inline flag turns case-insensitivity off for this one pattern, and the rule refuses to match inside a word, a hyphenated word or an all-caps acronym:
(?-i)(?<![\p{L}\p{N}-])(?:[Uu]u*m+|[Uu]u*h+|[Ee]e*rm+|[Hh]mm+)(?![\p{L}\p{N}-])[,\s]* - It still removes the drawn-out forms it removes today: umm, uhh, uum, hmmm and erm.
- Add one comment above it: fillers match only their spoken forms, so acronyms and hyphenated words survive.
- Leave the repeat rule (
:53), the opening-Okay rule (:52) and rockmelon (:54) as they are. Narrowing the repeat rule would stop common 'the, the' stutters from merging, and whether a leading 'Okay,' is filler is a product call.
Acceptance
LocalVoice --check-core runs CleanupChecks.run() (main.swift:848). Add these checks:
DictationCleanup.lightreturns each of these unchanged; each fails on 14d06bc:- 'We need to review the ERM framework.'
- 'Train an HMM on the data.'
- 'The UM campus and UH staff met.'
- 'Uh-huh, sounds good.'
- 'Mm-hmm, that works.'
- New filler check: 'Umm, I'll uh call you. Hmmm, erm, yes.' gives 'I'll call you. Yes.'
- Existing checks still pass: 'Um, I, I think we should go. Uh, bring a coat.',
CleanupStyle.light.example, and the full fixture with rockmelon.
Value before scope
- Outcome: the default style never deletes a word someone said. Evidence above.
- Simpler route: one regex. No new style or setting.
- Owner:
DictationCleanup.light. - Complexity: none added. An all-caps 'UM,' is no longer removed, and a recogniser that capitalises normally does not produce one.
- Verified by:
--check-core.
Grammar: Quality.
Refs #7
Build-ready record from the 15 Oct round-three pass (delight and code-base value), verified against the release train head 14d06bc by an independent skeptic per item. Closes only after native acceptance.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 1
- Avg merge
- 8h 5m
- Merged PRs (30d)
- 215
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Ship-Work/workbench
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 74/100
Ship-Work/workbench#29 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
All issues in Ship-Work/workbench
Similar issues
-
cmux-next: new workspaces show no name instead of workspace-NPossibly taken A pull request linked to this issue is open or already merged. Openarea: workspaces
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
manaflow-ai/cmux#21357 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
open-spaced-repetition/awesome-fsrs#81 ·
Maintainers usually reply within 2 days
-
agent/quality help wanted origin/quality quality stage/010-actionable testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
hivecommons/hotshot#227 ·
Maintainers usually reply within 1 day
-
bug core p3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RunanywhereAI/runanywhere-sdks#1142 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cucumberswift/CucumberSwift#437 ·
Maintainers usually reply within 1 day