Skip to content

Commit

Permalink
Merge pull request martinakaduc#6 from sangnguyenimp21/fix/blank_space
Browse files Browse the repository at this point in the history
fix: remove blank space before char
  • Loading branch information
martinakaduc authored Jun 21, 2023
2 parents b66955a + 2c8119c commit f929e81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pipeline/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def post_process(text):
else:
continue
output = " ".join(output)
special_chars = [',', '.', ':', '?', '!']
for char in special_chars:
if char in output:
output = output.replace(' '+char, char)
output = output[0].capitalize() + output[1:]
return output

Expand Down

0 comments on commit f929e81

Please sign in to comment.