uttrflow / uttrflow/uttrflow-swift

Spoken email addresses keep "at": 7 of 9 bench clips insert "support at example.com" instead of "support@example.com"

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

Description

## What happens

No clean-up pass turns a spoken "at" inside an email address into "@". The only "@" in `Sources/UttrflowAI` is a word-joiner for snippets (`SnippetExpander.swift:102`), and `Docs/cleanup.md` has no email-address row. Apple's model does not do it either on the shipping route.

`uttrflow-dev bench` on main, synthetic clips, fast mode, no screen context:

| Clip (addresses shortened here) | Recogniser | Inserted (shipping and rules identical) |
|---|---|---|
| `emails0-samantha` | `please send the contract to first.last at example.com by tonight.` | `Please send the contract to first.last at example.com by tonight.` |
| `emails1-daniel` | `My work address is ops-team at mail.example.org.` | same |
| `emails2-rishi` | `Forward the logs to support at example.com and copy x.surname at example.net.` | same |
| "Email me at sam at example dot com…" ×3 voices | `Email me at sam at example dot com when it is ready.` | same |
| "Write to info at example dot com and billing at example dot net." US / Indian | `info at example.com and billing at example.net` | same |

The recogniser wrote "@" itself in 3 other clips (UK voice twice, US once). So the address is right only when the recogniser happens to produce it; the clean-up never helps. In the "sam at example dot com" clips the "dot" is also left as a word.

`Docs/performance.md` reports this category as 2.2% final word error rate, because the bench's normaliser rewrites "@" as " at " before scoring (`Scripts/dictation_bench.py`, `normalise`), so the metric cannot see the failure (#568).

## Why it matters

Dictating an address is common in messages and email. "support at example.com" has to be fixed by hand every time, and in a mail client's To field it is not an address at all.

## How to reproduce

```
.build/release/uttrflow-dev clean --engine rules 'Forward the logs to support at example.com'
```

or run the bench's `emails` category (`Docs/performance.md`, re-running it).

## Acceptance criteria

- A token shaped like `local at domain.tld` (the local part a plausible address word, the domain containing a dot and a known or plausible TLD) becomes `local@domain.tld`; "dot" between address parts becomes "." in the same span.
- Ordinary "at" is untouched: "look at example.com" and "we met at the office at five" are corpus cases that must keep their words.
- Corpus cases added to `Sources/UttrflowEval/EvaluationCorpus.swift` for both sides and listed in `RulesCorpusTests.rulesMustPass`.

Contributor guide

Open the contributing guide

Research direction

Start with `.build/release/uttrflow-dev clean --engine rules` and inspect the existing cleanup rules, then review `Sources/UttrflowEval/EvaluationCorpus.swift` and `RulesCorpusTests.rulesMustPass`. Add corpus coverage for spoken email addresses and ordinary uses of “at”; done means plausible addresses normalize to `@` and “dot” to `.`, while ordinary “at” remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, swift
Domain
desktop, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.