Skip to content

Commit

Permalink
remove leading and trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nidleo committed Mar 4, 2024
1 parent 8905431 commit 8fbea20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/text_norm_whisper_like/english.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,4 +670,7 @@ def __call__(self, s: str):
s = re.sub(r"\s+", " ", s)
# replace any successive whitespaces with a space

s = re.sub(r"^\s+|\s+$", "", s)
# remove leading and trailing whitespaces

return s

0 comments on commit 8fbea20

Please sign in to comment.