uttrflow / uttrflow/uttrflow-swift
Add Hindi and Hinglish clean-up corpus cases: fillers that must stay, self-corrections, "sorry" after a pronoun, lakh and crore, and a sentence ending in "।"
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What this is
The clean-up corpus has six Hinglish cases (`Sources/UttrflowEval/EvaluationCorpus.swift:558-603`: `hinglish-late`, `hinglish-trailing-english`, `hinglish-false-start`, `hinglish-request`, `hinglish-negation-kept`, `hinglish-question`). None of them covers the places where Hindi and Hinglish dictation goes wrong today. Each case below was checked against `uttrflow-dev clean -e rules` or a bench run on `origin/main` 26d7bc1. The cases exist so a fix, or a regression, shows up in `make bakeoff` and the rules corpus.
## Cases to add (multilingual section)
All text is invented. Please keep it that way, with no real names.
| id | spoken | expected | also |
|---|---|---|---|
| `hinglish-fillers-kept` | "matlab main kal aaunga haan accha to phir milte hain" | keep "matlab", "haan" and "accha" (they are words, not fillers) | `mustKeep: ["kal", "milte"]` |
| `hinglish-sorry-after-pronoun` | "main late hoon sorry main abhi aata hoon" | "Main late hoon, sorry, main abhi aata hoon." | `mustKeep: ["late", "sorry"]` (rules delete them today) |
| `hinglish-correction-nahi-nahi` | "meeting chaar baje hai nahi nahi paanch baje hai" | "Meeting paanch baje hai." | `mustKeep: ["paanch"]`. Record today's result; a fix is a separate issue |
| `hinglish-lakh` | "flat ki keemat pachaas lakh rupaye hai" | "Flat ki keemat 50 lakh rupaye hai." | `mustKeep: ["50", "lakh"]` |
| `english-lakh-thousand` | "one lakh fifty thousand rupees" | pick one form; "One lakh 50,000 rupees." is wrong today | `mustNotAdd: ["One lakh 50,000"]` |
| `hindi-danda-ending` | "मेरी फ्लाइट 15 अगस्त को सुबह 9 बजे है।" (rules path) | no "।." | `mustNotAdd: ["।."]` |
| `hindi-worked-example-not-copied` | "मतलब मैं कल आऊँगा, हाँ, अच्छा तो फिर मिलते हैं" | "Matlab main kal aaunga, haan, accha to phir milte hain." | `mustNotAdd: ["standup", "deployment"]` |
| `hinglish-reduplication-kept` | "dheere dheere chalo aur jaldi jaldi khana mat khao" | unchanged apart from capital and stop | `mustKeep: ["dheere dheere", "jaldi jaldi"]` (should pass today; this pins it) |
Where the product decision is still open (lakh formatting, Hindi triggers), use `mustKeep`/`mustNotAdd` for what is certainly wrong and give the `expected` reference a comment saying it is provisional.
## Where to start
- `Sources/UttrflowEval/EvaluationCorpus.swift:558`: copy the shape of `hinglish-negation-kept`.
- `Sources/UttrflowEval/EvaluationCase.swift`: the fields (`expected`, `mustKeep`, `mustNotAdd`).
- Tests that read the corpus: `Tests/UttrflowEvalTests/RulesCorpusTests.swift`. Its `rulesMustPass` set lists the cases the rules must pass: add the cases the rules pass today (`hinglish-reduplication-kept`), and leave out the ones they fail until the matching fix lands. `Tests/UttrflowEvalTests/ScorerTests.swift:470` checks that no case repeats a prompt worked example, so `hindi-worked-example-not-copied` must differ from the example in `Sources/UttrflowAI/PromptContract.swift:53`.
- `uttrflow-dev clean -e rules ""` shows what the rules do with a case in a second.
- Before pushing, run `make verify` (export `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer` first). It is the same command CI runs, and it enforces the 95% coverage floor per module.
- Read [CONTRIBUTING.md](https://github.com/uttrflow/uttrflow-swift/blob/main/CONTRIBUTING.md) first, and say on this issue that you are taking it. Native Hindi speakers are especially welcome to correct the expected spellings.
**Size:** S, about 2–3 hours.
Contributor guide
Research direction
Read CONTRIBUTING.md, then copy the corpus-case shape near Sources/UttrflowEval/EvaluationCorpus.swift:558 and check EvaluationCase.swift fields. Run uttrflow-dev clean -e rules for the new prompts, add currently passing cases to RulesCorpusTests.swift, and ensure the worked-example case differs from PromptContract.swift:53. Done means the corpus entries and expectations are recorded, make verify passes, and no prompt example is duplicated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100