-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Preserve casing for never split tokens (#81429)
This fixes a bug introduced by #81254. We are now using a token trie tree to merge tokens belonging to one of the never-split tokens back together. However, if the tokenizer is lower casing, then the merged token will also be lower case and won't be matched against never split tokens that are expected to be in upper case. This commit fixes this by looking up the original text and only merging tokens together when the original text is matching one of the never split tokens.
- Loading branch information
1 parent
061d38c
commit 86f31c2
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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