uttrflow / uttrflow/uttrflow-swift
"new paragraph" and "new line" are left as words after a spoken full stop or question mark
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
`LayoutWordsPass` treats a layout phrase that opens its sentence as layout only when a mark sets it off after it (`Docs/cleanup.md`, layout words row, from #254). A spoken "full stop" or "question mark" just before it makes it open a sentence, so the most natural way to dictate a paragraph break is refused.
Rules only (`uttrflow-dev clean --engine rules`) on main:
| Input | Output |
|---|---|
| `the build is green new paragraph thanks everyone` | `The build is green.\n\nThanks everyone.` (works) |
| `the build is green full stop new paragraph thanks everyone` | `The build is green. New paragraph thanks everyone.` |
| `the build is green. new paragraph thanks everyone` | `The build is green. New paragraph thanks everyone.` |
| `is it ready question mark new line yes` | `Is it ready? New line yes.` |
End to end, the recogniser often punctuates the phrase itself. Bench clip "Is it ready question mark new paragraph yes exclamation mark" (US voice) was recognised as `Is it ready? Question mark. New paragraph. Yes. Exclamation mark.` and inserted as `Is it ready? New paragraph. Yes!` on both the shipping route and rules only.
## Why it matters
People who dictate punctuation say the stop and then the break. The words "new paragraph" land in the message.
## How to reproduce
```
.build/release/uttrflow-dev clean --engine rules 'the build is green full stop new paragraph thanks everyone'
```
## Acceptance criteria
- A layout phrase directly after a sentence end that came from a spoken or recognised mark (and followed by words) is layout: the rows above produce a break.
- "Number one" after a sentence keeps the #254 behaviour (`document-number-one-after-a-sentence-not-an-item` still passes).
- Corpus cases for "full stop new paragraph" and "question mark new line", listed in `RulesCorpusTests.rulesMustPass`.
Contributor guide
Research direction
Start with LayoutWordsPass and the layout-words row in Docs/cleanup.md, then run the provided rules-only reproduction. Check RulesCorpusTests.rulesMustPass for the named corpus cases and verify the acceptance examples produce paragraph or line breaks while document-number-one-after-a-sentence-not-an-item still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100