Skip to content

SFst: Support modern token aliases for sentence boundary symbols in WriteArpa. - #19

Merged
copybara-service[bot] merged 1 commit into
mainfrom
copybara/964629362
Aug 14, 2026
Merged

SFst: Support modern token aliases for sentence boundary symbols in WriteArpa.#19
copybara-service[bot] merged 1 commit into
mainfrom
copybara/964629362

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 14, 2026

Copy link
Copy Markdown

SFst: Support modern token aliases for sentence boundary symbols in WriteArpa.

Expands BOS candidate lookup to check <s>, <S>, <bos>, <BOS>, and [BOS],
and EOS candidate lookup to check </s>, </S>, <eos>, <EOS>, and [EOS].
Logs a warning when no known EOS alias is found before defaulting to </s>. Adds a unit test verifying modern <bos>/<eos> tokens.

Strictly speaking, the ARPA file format specification itself only dictates syntax and structure (\data\, \N-grams:, <log10_prob> <words...> [<log10_backoff>], \end\). It does not mandate specific reserved lexical strings for sentence boundaries—any whitespace-free token string is syntactically valid ARPA.

@copybara-service
copybara-service Bot force-pushed the copybara/964629362 branch 2 times, most recently from cc7a994 to 60f5c6a Compare August 14, 2026 17:14
…riteArpa.

Expands BOS candidate lookup to check `<s>`, `<S>`, `<bos>`, `<BOS>`, and `[BOS]`,
and EOS candidate lookup to check `</s>`, `</S>`, `<eos>`, `<EOS>`, and `[EOS]`.
Logs a warning when no known EOS alias is found before defaulting to `</s>`. Adds a unit test verifying modern `<bos>/<eos>` tokens.

Strictly speaking, the ARPA file format specification itself only dictates syntax and structure (`\data\, \N-grams:, <log10_prob> <words...> [<log10_backoff>], \end\`). It does not mandate specific reserved lexical strings for sentence boundaries—any whitespace-free token string is syntactically valid ARPA.

PiperOrigin-RevId: 964762723
@copybara-service copybara-service Bot closed this Aug 14, 2026
@copybara-service
copybara-service Bot merged commit 4be878d into main Aug 14, 2026
@copybara-service
copybara-service Bot deleted the copybara/964629362 branch August 14, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant