Repository navigation
fix(tn/en): read "in" as inches only when attached to the number - #115
Merged
Alex-Wengg merged 1 commit intoNov 13, 2026
Merged
Conversation
In sentence mode, "in" after a spaced number matched the inch unit, so
the preposition became a unit: "I have 5 in the box." read "I have five
inches the box." NeMo has no "in" unit; it reads the inch mark (12")
instead. "in" now reads "inch" only when written against the number
("27in"), the way single-letter units already need a space to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In sentence mode, a number followed by a spaced "in" matched the inch unit, so the preposition became a unit:
I have 5 in the box.I have five inches the box.NeMo has no "in" unit (
data/measure/unit.tsv); it reads the inch mark instead (12"->twelve inches).With this change, "in" reads "inch" only when it is written against the number (
27in->twenty seven inches), the way single-letter units already need a space before they match.5 inon its own is left to the other taggers.Tests
test_sentence_prose_false_positives(tests/en_tn_tests.rs):I have 5 in the box.fails on main and passes with the change;a 27in monitorstill reads inches.test_in_only_attachedinsrc/tn/en/measure.rschecksparse.Checks
cargo testpasses.cargo fmt --all --checkpasses, and clippy reports the same warnings as main.AI disclosure: written with Claude Code (Claude Opus 5.5), which found the issue, wrote the change, the tests and this description. I reviewed it and ran the checks on my Mac.