Skip to content

fix(script): keep a comma-grouped number and its hyphenated suffix wh… - #438

Open
ihsieh31 wants to merge 1 commit into
hypit-ai:mainfrom
ihsieh31:fix/script-comma-grouped-compound-word
Open

ihsieh31 wants to merge 1 commit into
hypit-ai:mainfrom
ihsieh31:fix/script-comma-grouped-compound-word

Conversation

@ihsieh31

Copy link
Copy Markdown

…ole (#391)

The number alternative of LEXICAL_UNIT only took numeric hyphenated suffixes, and its lookahead rejects stopping before -letters, so a comma group followed by a word fell back to the bare prefix and split at the comma: 1,000-word became 1, and 000-word, which also let a Cue break between them through (SCRIPT_CAPTION_BREAK_TOKEN_BOUNDARY never fired).

After its numeric suffixes the number alternative now takes one hyphenated word suffix, with the ' ’ . - joins the plain-word alternative allows. The joins matter: the number alternative comes first, so it now reaches compounds the word alternative used to own, and without them 90-year-old's or 2020-word.com would be cut at the apostrophe or dot. 1,000-word, 123,456,789-point and 1,000.5-word each stay one unit, every un-grouped compound tokenizes as before, and the regression test pins both.

…ole (hypit-ai#391)

The number alternative of LEXICAL_UNIT only took numeric hyphenated
suffixes, and its lookahead rejects stopping before -letters, so a
comma group followed by a word fell back to the bare prefix and split
at the comma: 1,000-word became 1, and 000-word, which also let a Cue
break between them through (SCRIPT_CAPTION_BREAK_TOKEN_BOUNDARY never
fired).

After its numeric suffixes the number alternative now takes one
hyphenated word suffix, with the ' ’ . - joins the plain-word
alternative allows. The joins matter: the number alternative comes
first, so it now reaches compounds the word alternative used to own,
and without them 90-year-old's or 2020-word.com would be cut at the
apostrophe or dot. 1,000-word, 123,456,789-point and 1,000.5-word each
stay one unit, every un-grouped compound tokenizes as before, and the
regression test pins both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SanHsien added a commit to SanHsien/hypit that referenced this pull request Oct 25, 2026
…advance the PR watermark

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant