Skip to content

fix: support L unit and number+unit denominator in Measure - #338

Merged
pengzhendong merged 1 commit into
masterfrom
fix/measure-liter-denominator
Jun 9, 2026
Merged

fix: support L unit and number+unit denominator in Measure#338
pengzhendong merged 1 commit into
masterfrom
fix/measure-liter-denominator

Conversation

@pengzhendong

@pengzhendong pengzhendong commented Jun 9, 2026

Copy link
Copy Markdown
Member

Closes #306

Summary

  • Add L → 升 to tn/chinese/data/measure/units_en.tsv
  • Allow denominator in X/Y patterns to be measure (number+unit), not just bare unit

Examples

Input Before After
4.5L/100km 四点五L/一百公里 每一百公里四点五升
10km/h 每小时十公里 每小时十公里 (unchanged)
5L (not matched) 五升

Test plan

  • All 1400 unit tests pass
  • CI passes

)

- Add L → 升 to units_en.tsv
- Allow denominator in X/Y patterns to be measure (number+unit),
  not just bare unit. This enables 4.5L/100km → 每一百公里四点五升
@pengzhendong
pengzhendong merged commit 1cf4f6c into master Jun 9, 2026
1 check passed
@pengzhendong
pengzhendong deleted the fix/measure-liter-denominator branch June 9, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

求解:4.5L/100km → 四点五升/一百公里

1 participant