Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Changed regular expression to add support of the unicode characters p…
Browse files Browse the repository at this point in the history
…rocessing and make code simple (#1411)

Signed-off-by: igeni <kublin@it8.ru>
Co-authored-by: intellinjun <105184542+intellinjun@users.noreply.github.com>
  • Loading branch information
igeni and intellinjun authored Mar 25, 2024
1 parent 3ae0cd0 commit fd2516b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate_case_matches_checkpoint(do_lower_case, init_checkpoint):
if not init_checkpoint:
return

m = re.match("^.*?([A-Za-z0-9_-]+)/bert_model.ckpt", init_checkpoint)
m = re.match("^.*?([-\w]+)/bert_model.ckpt", init_checkpoint)
if m is None:
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate_case_matches_checkpoint(do_lower_case, init_checkpoint):
if not init_checkpoint:
return

m = re.match("^.*?([A-Za-z0-9_-]+)/bert_model.ckpt", init_checkpoint)
m = re.match("^.*?([-\w]+)/bert_model.ckpt", init_checkpoint)
if m is None:
return

Expand Down

0 comments on commit fd2516b

Please sign in to comment.