-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalise
re_replacement_seq
to deal with special symbols
This PR is similar to #90, and generalises the regex to deal with all the previous, and hopefully all future cases as well. The new special case not covered by the previous approach are the `�?` and `�,` tokens, used by Salamandra models. Since all these special tokens (new and old) consist of one or more � symbols, with an optional single-character prefix and/or suffix, we can simplify and generalise the pattern to r"^.?�+.?$".
- Loading branch information
1 parent
78eb908
commit cad6344
Showing
2 changed files
with
12 additions
and
10 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