Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rairye authored Oct 30, 2021
1 parent a0200e8 commit 31c2940
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mnl_punct_norm/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def normalize_punct(input_str, mode, input_skips = "", replacement = " "):
if last_replacement == None or (last_replacement != None and i - last_replacement > 1):
result.append(input_str[0 if last_replacement == None else last_replacement+1:i])
last_replacement = i

if last_replacement == i-1:
last_replacement = i

if current_category == "SPACE" and mode == "REPLACE":
if last_category == "REPLACEMENT":
Expand Down

0 comments on commit 31c2940

Please sign in to comment.