uttrflow / uttrflow/uttrflow-swift

Add clean-up corpus cases for self-corrections with units, symbols, commas and a trigger said as its own sentence

Open Beginner friendly
#573 0 comments 0 reactions 0 assignees View on GitHub
area:dictation enhancement good first issue P2
Dominant language
Swift
Stars
4
Forks
17
Avg merge
3h 32m
Merged PRs (30d)
277

Description

## What happens

The corpus's self-correction cases (`self-correction`, `i-mean-correction`, `actually-between-numbers` and the list-shaped "kept" cases in `Sources/UttrflowEval/EvaluationCorpus.swift`) are all bare lower-case speech with no punctuation, no unit after the number and no currency or percent sign. The recogniser's real output for the same speech has all of those, and the rules fail on each (#550, #563, #564, #565).

## Where to start

Add cases in the shape of `actually-between-numbers`, using the text the recogniser produces rather than bare words:

| id (suggested) | spoken | expected |
|---|---|---|
| `correction-between-amounts` | `The total is $40, no wait, $50.` | `The total is $50.` |
| `correction-between-percentages` | `The fee is 40% actually 50%.` | `The fee is 50%.` |
| `correction-with-a-unit` | `we need twelve boxes i mean fifteen boxes` | `We need 15 boxes.` |
| `correction-between-commas` | `Book a table for six, actually eight, at the usual place.` | `Book a table for eight at the usual place.` |
| `correction-as-its-own-sentence` | `The total is $40. No wait. $50.` | `The total is $50.` |
| `no-opening-a-sentence-kept` | `No. We shipped it yesterday.` | unchanged |

- Use `mustNotAdd` for the discarded value (`["40"]`) and for doubled symbols (`["$$"]`).
- Do not add failing ids to `RulesCorpusTests.rulesMustPass`; add the ones that pass (the last row should).
- Check with `.build/release/uttrflow-dev clean --engine rules ''` and `swift test --filter RulesCorpusTests`, then `make verify` (export `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer` first). CONTRIBUTING.md has the rest.

## Acceptance criteria

- The six cases (or equivalents) are in the corpus.
- Passing ones are in `rulesMustPass`; `make verify` passes.

**Size:** S, about 1–2 hours.

Contributor guide

Open the contributing guide

Research direction

Add the six corpus cases to Sources/UttrflowEval/EvaluationCorpus.swift, following the shape of actually-between-numbers and using mustNotAdd where specified. Run the clean command for each case, then swift test --filter RulesCorpusTests and make verify with the documented DEVELOPER_DIR; done means the cases are present, passing ones are listed in rulesMustPass, and verification passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.